spirv: Add support for VK_EXT_descriptor_indexing uniform indexing caps.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 11 Apr 2018 23:34:29 +0000 (01:34 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 18 Apr 2018 20:56:54 +0000 (22:56 +0200)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/compiler/shader_info.h
src/compiler/spirv/spirv_to_nir.c

index ababe520b2d63dd83a5b388e5e9ede4dc8ad1014..6bbe526d2dc1f2acc44afe81517a10c10a5b5c51 100644 (file)
@@ -53,6 +53,7 @@ struct spirv_supported_capabilities {
    bool subgroup_vote;
    bool gcn_shader;
    bool trinary_minmax;
+   bool descriptor_array_dynamic_indexing;
 };
 
 typedef struct shader_info {
index 28274311c2b40e1e7aa8628241d1ade1238a3ddc..884f5b2c69ea2df5641571936eb52948ed6469d6 100644 (file)
@@ -3384,6 +3384,12 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
          spv_check_supported(shader_viewport_index_layer, cap);
          break;
 
+      case SpvCapabilityInputAttachmentArrayDynamicIndexingEXT:
+      case SpvCapabilityUniformTexelBufferArrayDynamicIndexingEXT:
+      case SpvCapabilityStorageTexelBufferArrayDynamicIndexingEXT:
+         spv_check_supported(descriptor_array_dynamic_indexing, cap);
+         break;
+
       default:
          vtn_fail("Unhandled capability");
       }