diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-02-13 16:05:51 +1300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-13 16:05:51 +1300 |
| commit | f37113204fe8e930c4e33e5e0149fbe0309fe425 (patch) | |
| tree | 9974c89131a5e1092f6551034926d9de0c32413e /Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp | |
| parent | 2c24d07837b9ab94219de592adf34a35a2dc897e (diff) | |
| parent | af313f84198d2eb52690b406164eebcb1866d251 (diff) | |
Merge pull request #11550 from iwubcode/set_common_samplers_count
VideoCommon: add constant value for maximum number of pixel samplers
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp b/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp index 8c9f744216..80bbd7e5b5 100644 --- a/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp +++ b/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp @@ -11,6 +11,7 @@ #include "Common/Thread.h" #include "VideoBackends/Vulkan/VulkanContext.h" +#include "VideoCommon/Constants.h" namespace Vulkan { @@ -148,14 +149,17 @@ VkDescriptorPool CommandBufferManager::CreateDescriptorPool(u32 max_descriptor_s /* * Worst case descriptor counts according to the descriptor layout created in ObjectCache.cpp: * UNIFORM_BUFFER_DYNAMIC: 3 - * COMBINED_IMAGE_SAMPLER: 18 + * COMBINED_IMAGE_SAMPLER: NUM_UTILITY_PIXEL_SAMPLERS + NUM_COMPUTE_SHADER_SAMPLERS + + * VideoCommon::MAX_PIXEL_SHADER_SAMPLERS * STORAGE_BUFFER: 2 * UNIFORM_TEXEL_BUFFER: 3 * STORAGE_IMAGE: 1 */ const std::array<VkDescriptorPoolSize, 5> pool_sizes{{ {VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, max_descriptor_sets * 3}, - {VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, max_descriptor_sets * 18}, + {VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, + max_descriptor_sets * (VideoCommon::MAX_PIXEL_SHADER_SAMPLERS + NUM_COMPUTE_SHADER_SAMPLERS + + NUM_UTILITY_PIXEL_SAMPLERS)}, {VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, max_descriptor_sets * 2}, {VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, max_descriptor_sets * 3}, {VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, max_descriptor_sets * 1}, |
