- /* uniforms list actually includes ubo's and ssbo's: */
- int max_slot = 0;
-
- nir_foreach_variable_with_modes (var, shader,
- nir_var_mem_ubo | nir_var_mem_ssbo) {
- int base = var->data.binding;
- int size = MAX2(1, glsl_array_size(var->type));
-
- max_slot = MAX2(max_slot, base + size);
- }
-
- NIR_VLA_FILL(bool, large_ubos, max_slot, 0);
- NIR_VLA_FILL(bool, large_ssbos, max_slot, 0);
+ NIR_VLA_FILL(bool, large_ubos, shader->info.num_ubos, 0);
+ NIR_VLA_FILL(bool, large_ssbos, shader->info.num_ssbos, 0);