Mesa (master): spirv: Don't bother counting num_images/num_textures

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jan 30 01:19:52 UTC 2021


Module: Mesa
Branch: master
Commit: fd44bcf9a843c753fe5915cd79842a965257abfd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fd44bcf9a843c753fe5915cd79842a965257abfd

Author: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Date:   Tue Jan 12 09:21:07 2021 -0800

spirv: Don't bother counting num_images/num_textures

Not only these are recalculated in nir_shader_gather_info, but
currently they are also counting all the images / textures in the
module instead of in the shader (entrypoint).

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8786>

---

 src/compiler/spirv/vtn_variables.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index ac5af93bf7d..5b286ad25cb 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1787,14 +1787,6 @@ vtn_create_variable(struct vtn_builder *b, struct vtn_value *val,
       }
       b->shader->info.num_ssbos++;
       break;
-   case vtn_variable_mode_uniform:
-      if (without_array->base_type == vtn_base_type_image) {
-         if (glsl_type_is_image(without_array->glsl_image))
-            b->shader->info.num_images++;
-         else if (glsl_type_is_sampler(without_array->glsl_image))
-            b->shader->info.num_textures++;
-      }
-      break;
    case vtn_variable_mode_push_constant:
       b->shader->num_uniforms =
          glsl_get_explicit_size(without_array->type, false);



More information about the mesa-commit mailing list