From 8a7932b095307e59e18781a819922f23161a1f5d Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 29 May 2020 16:36:54 -0500 Subject: [PATCH] spirv: Drop the sampled boolean from vtn_type It was set but never used. We always check the glsl_type instead. Reviewed-by: Caio Marcelo de Oliveira Filho Part-of: --- src/compiler/spirv/spirv_to_nir.c | 2 -- src/compiler/spirv/vtn_private.h | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 404fb449bc5..e24508ea812 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -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"); diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index 278a72e1828..7a1140a3891 100644 --- a/src/compiler/spirv/vtn_private.h +++ b/src/compiler/spirv/vtn_private.h @@ -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; -- 2.30.2