From: Jason Ekstrand Date: Mon, 13 Jan 2020 18:55:41 +0000 (-0600) Subject: anv: Don't over-advertise descriptor indexing features X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d36eed3e695d8f39495a3d81373a8c47853bae7e;p=mesa.git 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 Reviewed-by: Ivan Briano Part-of: --- 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; }