radeonsi: do not DCE texture vars

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19381>
This commit is contained in:
Karol Herbst 2022-10-26 16:59:19 +02:00 committed by Marge Bot
parent 761a2819b5
commit f8dd64739e

View file

@ -350,6 +350,7 @@ char *si_finalize_nir(struct pipe_screen *screen, void *nirptr)
/* Remove uniforms because those should have been lowered to UBOs already. */
nir_foreach_variable_with_modes_safe(var, nir, nir_var_uniform) {
if (!glsl_type_get_image_count(var->type) &&
!glsl_type_get_texture_count(var->type) &&
!glsl_type_get_sampler_count(var->type))
exec_node_remove(&var->node);
}