spirv: Add support for SpvCapabilityStorageImageReadWithoutFormat.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 14 Feb 2017 23:58:41 +0000 (00:58 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 15 Feb 2017 20:18:18 +0000 (21:18 +0100)
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/compiler/spirv/nir_spirv.h
src/compiler/spirv/spirv_to_nir.c

index e43e9b5382593af6c5a7a9cf2a9390b34ebb87a8..8864a8f73d71c0afb2303347663fd52753a3db20 100644 (file)
@@ -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;
 };
 
index 7e7874a5e49688a316cf1b653533e638389a1725..8108e1030bf71d6afd127947b1efd37a0c68f350 100644 (file)
@@ -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;