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 <christoph.pillmayer@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38821>
This commit is contained in:
Faith Ekstrand
2025-12-05 11:15:00 -05:00
committed by Marge Bot
parent da969df092
commit 5841106027
@@ -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 |