dzn: Vulkan 1.1 wants maxPerSetDescriptors >= 1024

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926>
This commit is contained in:
Boris Brezillon 2022-04-22 05:30:35 -07:00 committed by Marge Bot
parent 59a6ddd85c
commit b3b53952b0
1 changed files with 8 additions and 7 deletions

View File

@ -1495,14 +1495,15 @@ dzn_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
.maxMultiviewViewCount = 0, .maxMultiviewViewCount = 0,
.maxMultiviewInstanceIndex = 0, .maxMultiviewInstanceIndex = 0,
.protectedNoFault = false, .protectedNoFault = false,
/* Maximum number of descriptors in a GPU-visible sampler heap is 2048, /* Vulkan 1.1 wants this value to be at least 1024. Let's stick to this
* and 1000000 in a CBV/SRV/UAV heap, so let's pick the smallest * minimum requirement for now, and hope the total number of samplers
* limitation factor here. All descriptor sets are merged in a single * across all descriptor sets doesn't exceed 2048, otherwise we'd exceed
* heap when descriptor sets are bound to the command buffer, hence the * the maximum number of samplers per heap. For any descriptor set
* division by MAX_SETS. * containing more than 1024 descriptors,
* vkGetDescriptorSetLayoutSupport() can be called to determine if the
* layout is within D3D12 descriptor heap bounds.
*/ */
.maxPerSetDescriptors = .maxPerSetDescriptors = 1024,
MAX_DESCS_PER_SAMPLER_HEAP / MAX_SETS,
/* According to the spec, the maximum D3D12 resource size is /* According to the spec, the maximum D3D12 resource size is
* min(max(128MB, 0.25f * (amount of dedicated VRAM)), 2GB), * min(max(128MB, 0.25f * (amount of dedicated VRAM)), 2GB),
* but the limit actually depends on the max(system_ram, VRAM) not * but the limit actually depends on the max(system_ram, VRAM) not