uniform->num_compatible_subroutines = 0;
unsigned entries = MAX2(1, uniform->array_elements);
+ unsigned values = glsl_get_component_slots(type);
if (glsl_type_is_sampler(type_no_array)) {
int sampler_index =
state->shader_samplers_used |= 1U << i;
state->shader_shadow_samplers |= shadow << i;
}
+
+ state->num_values += values;
} else if (glsl_type_is_image(type_no_array)) {
/* @FIXME: image_index should match that of the same image
* uniform in other shaders. This means we need to match image
i++) {
stage_program->sh.ImageAccess[i] = access;
}
- }
- unsigned values = glsl_get_component_slots(type);
- state->num_shader_uniform_components += values;
- state->num_values += values;
+ if (!uniform->is_shader_storage) {
+ state->num_shader_uniform_components += values;
+ state->num_values += values;
+ }
+ } else {
+ if (!state->var_is_in_block) {
+ state->num_shader_uniform_components += values;
+ state->num_values += values;
+ }
+ }
if (uniform->remap_location != UNMAPPED_UNIFORM_LOC &&
state->max_uniform_location < uniform->remap_location + entries)