spirv/nir: Add support for SPV_KHR_8bit_storage
authorJose Maria Casanova Crespo <jmcasanova@igalia.com>
Mon, 9 Jul 2018 00:01:22 +0000 (02:01 +0200)
committerJose Maria Casanova Crespo <jmcasanova@igalia.com>
Mon, 9 Jul 2018 22:14:50 +0000 (00:14 +0200)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/shader_info.h
src/compiler/spirv/spirv_to_nir.c

index 8c58ee285ec9daecce84e3a9e58fd79a91ce0935..3b95d5962c07ffe961519f9a6cd3fdc74f4ef75b 100644 (file)
@@ -58,6 +58,7 @@ struct spirv_supported_capabilities {
    bool runtime_descriptor_array;
    bool stencil_export;
    bool atomic_storage;
+   bool storage_8bit;
 };
 
 typedef struct shader_info {
index fb4211193fba1e8140a6988f7db1869964ea7f3a..80a35b1b7505d86426df9f3aaa7120c193a244a0 100644 (file)
@@ -3498,6 +3498,12 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
          spv_check_supported(shader_viewport_index_layer, cap);
          break;
 
+      case SpvCapabilityStorageBuffer8BitAccess:
+      case SpvCapabilityUniformAndStorageBuffer8BitAccess:
+      case SpvCapabilityStoragePushConstant8:
+         spv_check_supported(storage_8bit, cap);
+         break;
+
       case SpvCapabilityInputAttachmentArrayDynamicIndexingEXT:
       case SpvCapabilityUniformTexelBufferArrayDynamicIndexingEXT:
       case SpvCapabilityStorageTexelBufferArrayDynamicIndexingEXT: