diff options
author | Juan A. Suarez Romero <[email protected]> | 2019-04-29 17:02:45 +0200 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2019-04-30 09:22:45 +0200 |
commit | bbbe00a1016bd7b9e777a94fbe92477dc6109678 (patch) | |
tree | c5f35924d4211366e58c2f10949dac5b4411e4dc | |
parent | 1fb663063694f191c30757af677ebfba76aace33 (diff) |
spirv: add missing SPV_EXT_descriptor_indexing capabilities
Add ShaderNonUniformEXT, UniformBufferArrayNonUniformIndexingEXT,
SampledImageArrayNonUniformIndexingEXT,
StorageBufferArrayNonUniformIndexingEXT,
StorageImageArrayNonUniformIndexingEXT,
InputAttachmentArrayNonUniformIndexingEXT,
UniformTexelBufferArrayNonUniformIndexingEXT and
StorageTexelBufferArrayNonUniformIndexingEXT capabilities.
Cc: [email protected]
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r-- | src/compiler/shader_info.h | 2 | ||||
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h index 45ba2982884..166ff8dec4e 100644 --- a/src/compiler/shader_info.h +++ b/src/compiler/shader_info.h @@ -37,6 +37,8 @@ struct spirv_supported_capabilities { bool atomic_storage; bool derivative_group; bool descriptor_array_dynamic_indexing; + bool descriptor_array_non_uniform_indexing; + bool descriptor_indexing; bool device_group; bool draw_parameters; bool float64; diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 0f3abd7be35..66097e4556f 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -3716,12 +3716,26 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, spv_check_supported(storage_8bit, cap); break; + case SpvCapabilityShaderNonUniformEXT: + spv_check_supported(descriptor_indexing, cap); + break; + case SpvCapabilityInputAttachmentArrayDynamicIndexingEXT: case SpvCapabilityUniformTexelBufferArrayDynamicIndexingEXT: case SpvCapabilityStorageTexelBufferArrayDynamicIndexingEXT: spv_check_supported(descriptor_array_dynamic_indexing, cap); break; + case SpvCapabilityUniformBufferArrayNonUniformIndexingEXT: + case SpvCapabilitySampledImageArrayNonUniformIndexingEXT: + case SpvCapabilityStorageBufferArrayNonUniformIndexingEXT: + case SpvCapabilityStorageImageArrayNonUniformIndexingEXT: + case SpvCapabilityInputAttachmentArrayNonUniformIndexingEXT: + case SpvCapabilityUniformTexelBufferArrayNonUniformIndexingEXT: + case SpvCapabilityStorageTexelBufferArrayNonUniformIndexingEXT: + spv_check_supported(descriptor_array_non_uniform_indexing, cap); + break; + case SpvCapabilityRuntimeDescriptorArrayEXT: spv_check_supported(runtime_descriptor_array, cap); break; |