From 58411060271d3c9ece10fe928c3bb34fc2420614 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Fri, 5 Dec 2025 11:15:00 -0500 Subject: [PATCH] pan/bi: Only delete function temp variables Other resource variables like UBOs and SSBOs are still useful for debugging and not harming anything. Also, some Vulkan-focused passes look up variables from the otherwise detached resource intrinsics and use them for things. We really want to keep them around. Reviewed-by: Christoph Pillmayer Acked-by: Eric R. Smith Part-of: --- src/panfrost/compiler/bifrost/bifrost_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/compiler/bifrost/bifrost_compile.c b/src/panfrost/compiler/bifrost/bifrost_compile.c index 47bcde73332..c34cdb3b73e 100644 --- a/src/panfrost/compiler/bifrost/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost/bifrost_compile.c @@ -6251,7 +6251,7 @@ bifrost_preprocess_nir(nir_shader *nir, unsigned gpu_id) /* Lower away all variables for smaller shaders */ NIR_PASS(_, nir, nir_lower_vars_to_ssa); - NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_all, NULL); + NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_function_temp, NULL); /* We assume that UBO and SSBO were lowered, let's move things around. */ nir_move_options move_all = nir_move_const_undef | nir_move_load_ubo |