This loop should only apply to UBOs and SSBOs because max_slot is never
used for normal uniforms.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966>
int max_slot = 0;
nir_foreach_variable (var, &shader->uniforms) {
int max_slot = 0;
nir_foreach_variable (var, &shader->uniforms) {
+ if (!(var->data.mode & (nir_var_mem_ubo | nir_var_mem_ssbo)))
+ continue;
+
int base = var->data.binding;
int size = MAX2(1, glsl_array_size(var->type));
int base = var->data.binding;
int size = MAX2(1, glsl_array_size(var->type));