[Mesa-dev] [PATCH 08/10] spirv: Add support for VK_EXT_descriptor_indexing uniform indexing caps.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Fri Apr 13 18:53:34 UTC 2018


On Fri, Apr 13, 2018 at 8:06 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
>
> On 04/12/2018 01:44 AM, Bas Nieuwenhuizen wrote:
>>
>> ---
>>   src/compiler/shader_info.h        | 1 +
>>   src/compiler/spirv/spirv_to_nir.c | 6 ++++++
>>   2 files changed, 7 insertions(+)
>>
>> diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
>> index ababe520b2d..c8128fea01b 100644
>> --- a/src/compiler/shader_info.h
>> +++ b/src/compiler/shader_info.h
>> @@ -53,6 +53,7 @@ struct spirv_supported_capabilities {
>>      bool subgroup_vote;
>>      bool gcn_shader;
>>      bool trinary_minmax;
>> +   bool full_uniform_desciptor_indexing;
>
>
> How about "descriptor_array_dynamic_indexing"? Other than that, there is a
> typo: descriptor

The thing this allows is dynamically uniform indexing for some
descriptor types which did not allow it previously, but a lot already
supported it. Hence the full.

>
>
>>   };
>>     typedef struct shader_info {
>> diff --git a/src/compiler/spirv/spirv_to_nir.c
>> b/src/compiler/spirv/spirv_to_nir.c
>> index 78c1e9ff597..04d26841188 100644
>> --- a/src/compiler/spirv/spirv_to_nir.c
>> +++ b/src/compiler/spirv/spirv_to_nir.c
>> @@ -3382,6 +3382,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(full_uniform_desciptor_indexing, cap);
>> +         break;
>> +
>>         default:
>>            vtn_fail("Unhandled capability");
>>         }
>>
>


More information about the mesa-dev mailing list