mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-15 20:20:25 +01:00
anv: Fix limits when VK_EXT_descriptor_indexing is used
Update various limits in
VkPhysicalDeviceDescriptorIndexingPropertiesEXT that were previously
zero to their values from VkPhysicalDeviceLimits. When using
VK_EXT_descriptor_indexing, the former limits will apply to all the
descriptor layout sets -- not only those using the new feature bits.
For the reference, VK_EXT_descriptor_indexing says
"There are new descriptor set layout and descriptor pool creation
flags that are required to opt in to the update-after-bind
functionality, and there are separate maxPerStage* and
maxDescriptorSet* limits that apply to these descriptor set
layouts which may be much higher than the pre-existing limits. The
old limits only count descriptors in non-updateAfterBind
descriptor set layouts, and the new limits count descriptors in
all descriptor set layouts in the pipeline layout."
Fixes: 6e230d7607 "anv: Implement VK_EXT_descriptor_indexing"
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 3610081daa)
This commit is contained in:
parent
87722e0c42
commit
38fdfdaff1
1 changed files with 14 additions and 9 deletions
|
|
@ -1170,6 +1170,11 @@ void anv_GetPhysicalDeviceFeatures2(
|
|||
}
|
||||
}
|
||||
|
||||
#define MAX_PER_STAGE_DESCRIPTOR_UNIFORM_BUFFERS 64
|
||||
|
||||
#define MAX_PER_STAGE_DESCRIPTOR_INPUT_ATTACHMENTS 64
|
||||
#define MAX_DESCRIPTOR_SET_INPUT_ATTACHMENTS 256
|
||||
|
||||
void anv_GetPhysicalDeviceProperties(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkPhysicalDeviceProperties* pProperties)
|
||||
|
|
@ -1215,20 +1220,20 @@ void anv_GetPhysicalDeviceProperties(
|
|||
.sparseAddressSpaceSize = 0,
|
||||
.maxBoundDescriptorSets = MAX_SETS,
|
||||
.maxPerStageDescriptorSamplers = max_samplers,
|
||||
.maxPerStageDescriptorUniformBuffers = 64,
|
||||
.maxPerStageDescriptorUniformBuffers = MAX_PER_STAGE_DESCRIPTOR_UNIFORM_BUFFERS,
|
||||
.maxPerStageDescriptorStorageBuffers = max_ssbos,
|
||||
.maxPerStageDescriptorSampledImages = max_textures,
|
||||
.maxPerStageDescriptorStorageImages = max_images,
|
||||
.maxPerStageDescriptorInputAttachments = 64,
|
||||
.maxPerStageDescriptorInputAttachments = MAX_PER_STAGE_DESCRIPTOR_INPUT_ATTACHMENTS,
|
||||
.maxPerStageResources = max_per_stage,
|
||||
.maxDescriptorSetSamplers = 6 * max_samplers, /* number of stages * maxPerStageDescriptorSamplers */
|
||||
.maxDescriptorSetUniformBuffers = 6 * 64, /* number of stages * maxPerStageDescriptorUniformBuffers */
|
||||
.maxDescriptorSetUniformBuffers = 6 * MAX_PER_STAGE_DESCRIPTOR_UNIFORM_BUFFERS, /* number of stages * maxPerStageDescriptorUniformBuffers */
|
||||
.maxDescriptorSetUniformBuffersDynamic = MAX_DYNAMIC_BUFFERS / 2,
|
||||
.maxDescriptorSetStorageBuffers = 6 * max_ssbos, /* number of stages * maxPerStageDescriptorStorageBuffers */
|
||||
.maxDescriptorSetStorageBuffersDynamic = MAX_DYNAMIC_BUFFERS / 2,
|
||||
.maxDescriptorSetSampledImages = 6 * max_textures, /* number of stages * maxPerStageDescriptorSampledImages */
|
||||
.maxDescriptorSetStorageImages = 6 * max_images, /* number of stages * maxPerStageDescriptorStorageImages */
|
||||
.maxDescriptorSetInputAttachments = 256,
|
||||
.maxDescriptorSetInputAttachments = MAX_DESCRIPTOR_SET_INPUT_ATTACHMENTS,
|
||||
.maxVertexInputAttributes = MAX_VBS,
|
||||
.maxVertexInputBindings = MAX_VBS,
|
||||
.maxVertexInputAttributeOffset = 2047,
|
||||
|
|
@ -1393,20 +1398,20 @@ void anv_GetPhysicalDeviceProperties2(
|
|||
props->robustBufferAccessUpdateAfterBind = true;
|
||||
props->quadDivergentImplicitLod = false;
|
||||
props->maxPerStageDescriptorUpdateAfterBindSamplers = max_bindless_views;
|
||||
props->maxPerStageDescriptorUpdateAfterBindUniformBuffers = 0;
|
||||
props->maxPerStageDescriptorUpdateAfterBindUniformBuffers = MAX_PER_STAGE_DESCRIPTOR_UNIFORM_BUFFERS;
|
||||
props->maxPerStageDescriptorUpdateAfterBindStorageBuffers = UINT32_MAX;
|
||||
props->maxPerStageDescriptorUpdateAfterBindSampledImages = max_bindless_views;
|
||||
props->maxPerStageDescriptorUpdateAfterBindStorageImages = max_bindless_views;
|
||||
props->maxPerStageDescriptorUpdateAfterBindInputAttachments = 0;
|
||||
props->maxPerStageDescriptorUpdateAfterBindInputAttachments = MAX_PER_STAGE_DESCRIPTOR_INPUT_ATTACHMENTS;
|
||||
props->maxPerStageUpdateAfterBindResources = UINT32_MAX;
|
||||
props->maxDescriptorSetUpdateAfterBindSamplers = max_bindless_views;
|
||||
props->maxDescriptorSetUpdateAfterBindUniformBuffers = 0;
|
||||
props->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = 0;
|
||||
props->maxDescriptorSetUpdateAfterBindUniformBuffers = 6 * MAX_PER_STAGE_DESCRIPTOR_UNIFORM_BUFFERS;
|
||||
props->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = MAX_DYNAMIC_BUFFERS / 2;
|
||||
props->maxDescriptorSetUpdateAfterBindStorageBuffers = UINT32_MAX;
|
||||
props->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = MAX_DYNAMIC_BUFFERS / 2;
|
||||
props->maxDescriptorSetUpdateAfterBindSampledImages = max_bindless_views;
|
||||
props->maxDescriptorSetUpdateAfterBindStorageImages = max_bindless_views;
|
||||
props->maxDescriptorSetUpdateAfterBindInputAttachments = 0;
|
||||
props->maxDescriptorSetUpdateAfterBindInputAttachments = MAX_DESCRIPTOR_SET_INPUT_ATTACHMENTS;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue