Mesa (main): dzn: Vulkan 1.1 wants maxPerSetDescriptors >= 1024

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 14 23:17:14 UTC 2022


Module: Mesa
Branch: main
Commit: b3b53952b00a1e6abf9273a073bd1253685a3dff
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b3b53952b00a1e6abf9273a073bd1253685a3dff

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Fri Apr 22 05:30:35 2022 -0700

dzn: Vulkan 1.1 wants maxPerSetDescriptors >= 1024

Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926>

---

 src/microsoft/vulkan/dzn_device.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

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



More information about the mesa-commit mailing list