diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2023-02-10 00:28:06 -0600 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2023-02-10 00:46:11 -0600 |
| commit | af313f84198d2eb52690b406164eebcb1866d251 (patch) | |
| tree | 416ef17d361fa48b7f2c9ce35b23448186f2a357 /Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp | |
| parent | a88e5ef3907e79ed20ab67e4df45c36e6ab2b909 (diff) | |
VideoCommon: add constant value to set the allowed 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}, |
