aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-05-26 04:36:33 -0400
committerMarge Bot <[email protected]>2020-06-02 20:47:49 +0000
commitf8ef15c061fbb0e6da255ab06d7afd8128faee48 (patch)
tree8426414448b73beab53b46fe4892a510da1799c8 /src/compiler/nir
parentc6c8a9bd554f51c05bba5ab2c6cbc70edae9d10f (diff)
nir: don't count samplers and images in interface blocks
Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir_gather_info.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c
index d1c3e6168cf..df422ea21f3 100644
--- a/src/compiler/nir/nir_gather_info.c
+++ b/src/compiler/nir/nir_gather_info.c
@@ -600,8 +600,11 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint)
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);