diff options
author | Jason Ekstrand <[email protected]> | 2020-01-13 12:55:41 -0600 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-01-13 22:33:55 +0000 |
commit | d36eed3e695d8f39495a3d81373a8c47853bae7e (patch) | |
tree | 0361c936ece6f859eb9c25d90a1e27aa5a21aae2 | |
parent | d7ff137445b9bfd0cf15d176d0d152d16634559f (diff) |
anv: Don't over-advertise descriptor indexing features
We should only advertise sub-features if we advertise the extension.
Fixes: 6e230d7607f "anv: Implement VK_EXT_descriptor_indexing"
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Reviewed-by: Ivan Briano <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3369>
-rw-r--r-- | src/intel/vulkan/anv_device.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index c6d31190a68..a4cb6691086 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -1058,26 +1058,28 @@ void anv_GetPhysicalDeviceFeatures2( case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT: { VkPhysicalDeviceDescriptorIndexingFeaturesEXT *features = (VkPhysicalDeviceDescriptorIndexingFeaturesEXT *)ext; + bool descIndexing = pdevice->has_a64_buffer_access && + pdevice->has_bindless_images; features->shaderInputAttachmentArrayDynamicIndexing = false; - features->shaderUniformTexelBufferArrayDynamicIndexing = true; - features->shaderStorageTexelBufferArrayDynamicIndexing = true; + features->shaderUniformTexelBufferArrayDynamicIndexing = descIndexing; + features->shaderStorageTexelBufferArrayDynamicIndexing = descIndexing; features->shaderUniformBufferArrayNonUniformIndexing = false; - features->shaderSampledImageArrayNonUniformIndexing = true; - features->shaderStorageBufferArrayNonUniformIndexing = true; - features->shaderStorageImageArrayNonUniformIndexing = true; + features->shaderSampledImageArrayNonUniformIndexing = descIndexing; + features->shaderStorageBufferArrayNonUniformIndexing = descIndexing; + features->shaderStorageImageArrayNonUniformIndexing = descIndexing; features->shaderInputAttachmentArrayNonUniformIndexing = false; - features->shaderUniformTexelBufferArrayNonUniformIndexing = true; - features->shaderStorageTexelBufferArrayNonUniformIndexing = true; + features->shaderUniformTexelBufferArrayNonUniformIndexing = descIndexing; + features->shaderStorageTexelBufferArrayNonUniformIndexing = descIndexing; features->descriptorBindingUniformBufferUpdateAfterBind = false; - features->descriptorBindingSampledImageUpdateAfterBind = true; - features->descriptorBindingStorageImageUpdateAfterBind = true; - features->descriptorBindingStorageBufferUpdateAfterBind = true; - features->descriptorBindingUniformTexelBufferUpdateAfterBind = true; - features->descriptorBindingStorageTexelBufferUpdateAfterBind = true; - features->descriptorBindingUpdateUnusedWhilePending = true; - features->descriptorBindingPartiallyBound = true; + features->descriptorBindingSampledImageUpdateAfterBind = descIndexing; + features->descriptorBindingStorageImageUpdateAfterBind = descIndexing; + features->descriptorBindingStorageBufferUpdateAfterBind = descIndexing; + features->descriptorBindingUniformTexelBufferUpdateAfterBind = descIndexing; + features->descriptorBindingStorageTexelBufferUpdateAfterBind = descIndexing; + features->descriptorBindingUpdateUnusedWhilePending = descIndexing; + features->descriptorBindingPartiallyBound = descIndexing; features->descriptorBindingVariableDescriptorCount = false; - features->runtimeDescriptorArray = true; + features->runtimeDescriptorArray = descIndexing; break; } |