anv: Accurately advertise dynamic descriptor limits
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 4 Mar 2017 18:52:43 +0000 (10:52 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 13 Mar 2017 14:57:03 +0000 (07:57 -0700)
The number of dynamic descriptors is limited by both the number of
descriptors and the total number of dynamic things.  Because there isn't
a single "maximum dynamic things" limit, we need to divide by two so
that they can create the maximum of both UBOs and SSBOs.

Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Cc: "17.0 13.0" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/anv_device.c

index 7a087bd0f0640340d588b93d5aa696a5c73a6ff6..f04e177771ed963642a32b089e5dab6a0104d1cc 100644 (file)
@@ -565,9 +565,9 @@ void anv_GetPhysicalDeviceProperties(
       .maxPerStageResources                     = 128,
       .maxDescriptorSetSamplers                 = 256,
       .maxDescriptorSetUniformBuffers           = 256,
-      .maxDescriptorSetUniformBuffersDynamic    = 256,
+      .maxDescriptorSetUniformBuffersDynamic    = MAX_DYNAMIC_BUFFERS / 2,
       .maxDescriptorSetStorageBuffers           = 256,
-      .maxDescriptorSetStorageBuffersDynamic    = 256,
+      .maxDescriptorSetStorageBuffersDynamic    = MAX_DYNAMIC_BUFFERS / 2,
       .maxDescriptorSetSampledImages            = 256,
       .maxDescriptorSetStorageImages            = 256,
       .maxDescriptorSetInputAttachments         = 256,