From: Juan A. Suarez Romero Date: Mon, 29 Apr 2019 15:02:45 +0000 (+0200) Subject: spirv: add missing SPV_EXT_descriptor_indexing capabilities X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bbbe00a1016bd7b9e777a94fbe92477dc6109678;p=mesa.git spirv: add missing SPV_EXT_descriptor_indexing capabilities Add ShaderNonUniformEXT, UniformBufferArrayNonUniformIndexingEXT, SampledImageArrayNonUniformIndexingEXT, StorageBufferArrayNonUniformIndexingEXT, StorageImageArrayNonUniformIndexingEXT, InputAttachmentArrayNonUniformIndexingEXT, UniformTexelBufferArrayNonUniformIndexingEXT and StorageTexelBufferArrayNonUniformIndexingEXT capabilities. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Jason Ekstrand Reviewed-by: Bas Nieuwenhuizen --- 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;