spirv: Drop the sampled boolean from vtn_type
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 29 May 2020 21:36:54 +0000 (16:36 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 24 Jul 2020 03:43:21 +0000 (22:43 -0500)
It was set but never used.  We always check the glsl_type instead.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_private.h

index 404fb449bc54f77b155964a4f9bb3954b4ae81e0..e24508ea812314fce640d1993913e476111fa7ad 100644 (file)
@@ -1432,11 +1432,9 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
       enum glsl_base_type sampled_base_type =
          glsl_get_base_type(sampled_type->type);
       if (sampled == 1) {
-         val->type->sampled = true;
          val->type->type = glsl_sampler_type(dim, false, is_array,
                                              sampled_base_type);
       } else if (sampled == 2) {
-         val->type->sampled = false;
          val->type->type = glsl_image_type(dim, is_array, sampled_base_type);
       } else {
          vtn_fail("We need to know if the image will be sampled");
index 278a72e1828f91d8fbe94aeace7f799ade8d71a6..7a1140a38915ae8d09d8ad9d13a1f684f95ee995 100644 (file)
@@ -401,9 +401,6 @@ struct vtn_type {
 
       /* Members for image types */
       struct {
-         /* For images, indicates whether it's sampled or storage */
-         bool sampled;
-
          /* Image format for image_load_store type images */
          unsigned image_format;