diff options
author | Bas Nieuwenhuizen <[email protected]> | 2018-04-11 19:08:30 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2018-04-18 22:56:54 +0200 |
commit | 0e10790558b01f09b9517495f7368860af47ee97 (patch) | |
tree | 4ee6adcd22a795b07af92947913bdc06f1584380 /src/amd/vulkan/radv_device.c | |
parent | 5f7ebb52064fb610580fd5f6e3ebd54852185e47 (diff) |
radv: Enable VK_EXT_descriptor_indexing.
This adds everything except non-uniform indexing, which needs a bit
more work and testing.
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r-- | src/amd/vulkan/radv_device.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index fda21fa998a..fd11cedcbfe 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -735,6 +735,31 @@ void radv_GetPhysicalDeviceFeatures2( features->samplerYcbcrConversion = false; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT: { + VkPhysicalDeviceDescriptorIndexingFeaturesEXT *features = + (VkPhysicalDeviceDescriptorIndexingFeaturesEXT*)features; + features->shaderInputAttachmentArrayDynamicIndexing = true; + features->shaderUniformTexelBufferArrayDynamicIndexing = true; + features->shaderStorageTexelBufferArrayDynamicIndexing = true; + features->shaderUniformBufferArrayNonUniformIndexing = false; + features->shaderSampledImageArrayNonUniformIndexing = false; + features->shaderStorageBufferArrayNonUniformIndexing = false; + features->shaderStorageImageArrayNonUniformIndexing = false; + features->shaderInputAttachmentArrayNonUniformIndexing = false; + features->shaderUniformTexelBufferArrayNonUniformIndexing = false; + features->shaderStorageTexelBufferArrayNonUniformIndexing = false; + features->descriptorBindingUniformBufferUpdateAfterBind = true; + features->descriptorBindingSampledImageUpdateAfterBind = true; + features->descriptorBindingStorageImageUpdateAfterBind = true; + features->descriptorBindingStorageBufferUpdateAfterBind = true; + features->descriptorBindingUniformTexelBufferUpdateAfterBind = true; + features->descriptorBindingStorageTexelBufferUpdateAfterBind = true; + features->descriptorBindingUpdateUnusedWhilePending = true; + features->descriptorBindingPartiallyBound = true; + features->descriptorBindingVariableDescriptorCount = true; + features->runtimeDescriptorArray = true; + break; + } default: break; } @@ -1014,6 +1039,41 @@ void radv_GetPhysicalDeviceProperties2( properties->maxVertexAttribDivisor = UINT32_MAX; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT: { + VkPhysicalDeviceDescriptorIndexingPropertiesEXT *properties = + (VkPhysicalDeviceDescriptorIndexingPropertiesEXT*)ext; + properties->maxUpdateAfterBindDescriptorsInAllPools = UINT32_MAX / 64; + properties->shaderUniformBufferArrayNonUniformIndexingNative = false; + properties->shaderSampledImageArrayNonUniformIndexingNative = false; + properties->shaderStorageBufferArrayNonUniformIndexingNative = false; + properties->shaderStorageImageArrayNonUniformIndexingNative = false; + properties->shaderInputAttachmentArrayNonUniformIndexingNative = false; + properties->robustBufferAccessUpdateAfterBind = false; + properties->quadDivergentImplicitLod = false; + + size_t max_descriptor_set_size = ((1ull << 31) - 16 * MAX_DYNAMIC_BUFFERS) / + (32 /* uniform buffer, 32 due to potential space wasted on alignment */ + + 32 /* storage buffer, 32 due to potential space wasted on alignment */ + + 32 /* sampler, largest when combined with image */ + + 64 /* sampled image */ + + 64 /* storage image */); + properties->maxPerStageDescriptorUpdateAfterBindSamplers = max_descriptor_set_size; + properties->maxPerStageDescriptorUpdateAfterBindUniformBuffers = max_descriptor_set_size; + properties->maxPerStageDescriptorUpdateAfterBindStorageBuffers = max_descriptor_set_size; + properties->maxPerStageDescriptorUpdateAfterBindSampledImages = max_descriptor_set_size; + properties->maxPerStageDescriptorUpdateAfterBindStorageImages = max_descriptor_set_size; + properties->maxPerStageDescriptorUpdateAfterBindInputAttachments = max_descriptor_set_size; + properties->maxPerStageUpdateAfterBindResources = max_descriptor_set_size; + properties->maxDescriptorSetUpdateAfterBindSamplers = max_descriptor_set_size; + properties->maxDescriptorSetUpdateAfterBindUniformBuffers = max_descriptor_set_size; + properties->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = MAX_DYNAMIC_UNIFORM_BUFFERS; + properties->maxDescriptorSetUpdateAfterBindStorageBuffers = max_descriptor_set_size; + properties->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = MAX_DYNAMIC_STORAGE_BUFFERS; + properties->maxDescriptorSetUpdateAfterBindSampledImages = max_descriptor_set_size; + properties->maxDescriptorSetUpdateAfterBindStorageImages = max_descriptor_set_size; + properties->maxDescriptorSetUpdateAfterBindInputAttachments = max_descriptor_set_size; + break; + } default: break; } |