[Mesa-dev] [PATCH 2/3] spirv: Add support for SpvCapabilityStorageImageReadWithoutFormat.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Wed Feb 15 00:36:38 UTC 2017


Signed-off-by: Bas Nieuwenhuizen <basni at google.com>
---
 src/compiler/spirv/nir_spirv.h    | 1 +
 src/compiler/spirv/spirv_to_nir.c | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/compiler/spirv/nir_spirv.h b/src/compiler/spirv/nir_spirv.h
index e43e9b53825..8864a8f73d7 100644
--- a/src/compiler/spirv/nir_spirv.h
+++ b/src/compiler/spirv/nir_spirv.h
@@ -49,6 +49,7 @@ struct nir_spirv_supported_extensions {
    bool image_ms_array;
    bool tessellation;
    bool draw_parameters;
+   bool image_read_without_format;
    bool image_write_without_format;
 };
 
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 7e7874a5e49..8108e1030bf 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -2663,7 +2663,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
       case SpvCapabilitySparseResidency:
       case SpvCapabilityMinLod:
       case SpvCapabilityTransformFeedback:
-      case SpvCapabilityStorageImageReadWithoutFormat:
          vtn_warn("Unsupported SPIR-V capability: %s",
                   spirv_capability_to_string(cap));
          break;
@@ -2699,6 +2698,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
          spv_check_supported(draw_parameters, cap);
          break;
 
+      case SpvCapabilityStorageImageReadWithoutFormat:
+         spv_check_supported(image_read_without_format, cap);
+         break;
+
       case SpvCapabilityStorageImageWriteWithoutFormat:
          spv_check_supported(image_write_without_format, cap);
          break;
-- 
2.11.1



More information about the mesa-dev mailing list