mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
panfrost: remove panfrost_create_shader_state() related dead code
The pointer "xfb" is allocated with a clone of "so->nir" and lost without further processing. The function panfrost_shader_compile() was the one processing "xfb". The call of this function was removed with the commit40372bd720. This makes "xfb" not required anymore. For instance, this issue is triggered on a Mali-T820 with "piglit/bin/arb_transform_feedback2-change-objects-while-paused -auto": Indirect leak of 32776 byte(s) in 1 object(s) allocated from: #0 0xf78f30a6 in malloc (/usr/lib/libasan.so.6+0x840a6) #1 0xee9cd4ee in ralloc_size ../src/util/ralloc.c:118 #2 0xee9cf7ae in create_slab ../src/util/ralloc.c:801 #3 0xee9cf7ae in gc_alloc_size ../src/util/ralloc.c:840 #4 0xef74ab82 in nir_undef_instr_create ../src/compiler/nir/nir.c:888 #5 0xef76212c in clone_ssa_undef ../src/compiler/nir/nir_clone.c:328 #6 0xef76212c in clone_instr ../src/compiler/nir/nir_clone.c:438 #7 0xef7642d8 in clone_block ../src/compiler/nir/nir_clone.c:501 #8 0xef7642d8 in clone_cf_list ../src/compiler/nir/nir_clone.c:555 #9 0xef7657dc in clone_function_impl ../src/compiler/nir/nir_clone.c:632 #10 0xef766cb8 in nir_shader_clone ../src/compiler/nir/nir_clone.c:743 #11 0xf007673e in panfrost_create_shader_state ../src/gallium/drivers/panfrost/pan_shader.c:434 #12 0xeeb6766c in st_create_common_variant ../src/mesa/state_tracker/st_program.c:781 #13 0xeeb71d1c in st_get_common_variant ../src/mesa/state_tracker/st_program.c:834 #14 0xeeb72ea2 in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1320 #15 0xeeb72ea2 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1421 #16 0xef3806ec in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:748 #17 0xef3806ec in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:984 #18 0xef2992f6 in link_program ../src/mesa/main/shaderapi.c:1336 #19 0xef2992f6 in link_program_error ../src/mesa/main/shaderapi.c:1445 Fixes:40372bd720("panfrost: Implement a disk cache") Signed-off-by: Patrick Lerda <patrick9876@free.fr> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28743> (cherry picked from commit4f5e9a21c5)
This commit is contained in:
parent
51dd480f79
commit
5a1d9cb484
2 changed files with 1 additions and 5 deletions
|
|
@ -1574,7 +1574,7 @@
|
|||
"description": "panfrost: remove panfrost_create_shader_state() related dead code",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "40372bd720fe16186e9abc832bb452a3143d0e00",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -383,10 +383,6 @@ panfrost_create_shader_state(struct pipe_context *pctx,
|
|||
struct panfrost_context *ctx = pan_context(pctx);
|
||||
|
||||
if (so->nir->xfb_info) {
|
||||
nir_shader *xfb = nir_shader_clone(NULL, so->nir);
|
||||
xfb->info.name = ralloc_asprintf(xfb, "%s@xfb", xfb->info.name);
|
||||
xfb->info.internal = true;
|
||||
|
||||
so->xfb = calloc(1, sizeof(struct panfrost_compiled_shader));
|
||||
so->xfb->key.vs_is_xfb = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue