shader->info.last_msaa_image = -1;
nir_foreach_variable(var, &shader->uniforms) {
- /* Bindless textures and images don't use non-bindless slots. */
- if (var->data.bindless)
+ /* Bindless textures and images don't use non-bindless slots.
+ * Interface blocks imply inputs, outputs, UBO, or SSBO, which can only
+ * mean bindless.
+ */
+ if (var->data.bindless || var->interface_type)
continue;
shader->info.num_textures += glsl_type_get_sampler_count(var->type);
glsl_type_get_sampler_count(glsl_without_array(type)));
}
- if (glsl_type_is_struct_or_ifc(type)) {
+ /* Ignore interface blocks - they can only contain bindless samplers,
+ * which we shouldn't count.
+ */
+ if (glsl_type_is_struct(type)) {
unsigned count = 0;
for (unsigned i = 0; i < glsl_get_length(type); i++)
count += glsl_type_get_sampler_count(glsl_get_struct_field(type, i));
glsl_type_get_image_count(glsl_without_array(type)));
}
- if (glsl_type_is_struct_or_ifc(type)) {
+ /* Ignore interface blocks - they can only contain bindless images,
+ * which we shouldn't count.
+ */
+ if (glsl_type_is_struct(type)) {
unsigned count = 0;
for (unsigned i = 0; i < glsl_get_length(type); i++)
count += glsl_type_get_image_count(glsl_get_struct_field(type, i));