radv: Increase the number of dynamic uniform buffers.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 9 Mar 2018 16:18:03 +0000 (17:18 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 12 Mar 2018 08:46:22 +0000 (09:46 +0100)
The vulkan API is not ideal as it does not allow us have a
shared limit.

Feral needs 15+6 for one of their games, and I'm not a fan
of overcommitting the limits, so increase the number of
dynamic uniform buffers to 16.

CC: <mesa-stable@lists.freedesktop.org>
CC: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_private.h

index 7a11e08f97c6665f3b87c0b86be7b10e46db34c7..0ed3e27c7bcbf5c35bd2b33dd8e4a825b26234dd 100644 (file)
@@ -775,9 +775,9 @@ void radv_GetPhysicalDeviceProperties(
                .maxPerStageResources                     = max_descriptor_set_size,
                .maxDescriptorSetSamplers                 = max_descriptor_set_size,
                .maxDescriptorSetUniformBuffers           = max_descriptor_set_size,
-               .maxDescriptorSetUniformBuffersDynamic    = MAX_DYNAMIC_BUFFERS / 2,
+               .maxDescriptorSetUniformBuffersDynamic    = MAX_DYNAMIC_UNIFORM_BUFFERS,
                .maxDescriptorSetStorageBuffers           = max_descriptor_set_size,
-               .maxDescriptorSetStorageBuffersDynamic    = MAX_DYNAMIC_BUFFERS / 2,
+               .maxDescriptorSetStorageBuffersDynamic    = MAX_DYNAMIC_STORAGE_BUFFERS,
                .maxDescriptorSetSampledImages            = max_descriptor_set_size,
                .maxDescriptorSetStorageImages            = max_descriptor_set_size,
                .maxDescriptorSetInputAttachments         = max_descriptor_set_size,
index 0f8ddb2e106946aed59d7f4727b33f891f485635..439522585a730bc589fb6fbbfa5d95da7196da71 100644 (file)
@@ -87,7 +87,9 @@ typedef uint32_t xcb_window_t;
 #define MAX_DISCARD_RECTANGLES 4
 #define MAX_PUSH_CONSTANTS_SIZE 128
 #define MAX_PUSH_DESCRIPTORS 32
-#define MAX_DYNAMIC_BUFFERS 16
+#define MAX_DYNAMIC_UNIFORM_BUFFERS 16
+#define MAX_DYNAMIC_STORAGE_BUFFERS 8
+#define MAX_DYNAMIC_BUFFERS (MAX_DYNAMIC_UNIFORM_BUFFERS + MAX_DYNAMIC_STORAGE_BUFFERS)
 #define MAX_SAMPLES_LOG2 4
 #define NUM_META_FS_KEYS 13
 #define RADV_MAX_DRM_DEVICES 8