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>
/* 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);
}