diff options
| author | 2021-09-13 17:20:07 -0400 | |
|---|---|---|
| committer | 2021-09-13 17:20:07 -0400 | |
| commit | fde9b84b2123ba2e018e985024bf8c4d556798f0 (patch) | |
| tree | 3c5d270419105b9d30114c344e05c4f7aeda7947 /src/video_core/renderer_vulkan | |
| parent | Merge pull request #7001 from ameerj/wario-fix (diff) | |
| parent | Vulkan/Descriptors: Increase sets per pool on AMFD propietary driver. (diff) | |
| download | yuzu-fde9b84b2123ba2e018e985024bf8c4d556798f0.tar.gz yuzu-fde9b84b2123ba2e018e985024bf8c4d556798f0.tar.xz yuzu-fde9b84b2123ba2e018e985024bf8c4d556798f0.zip | |
Merge pull request #6944 from FernandoS27/dear-drunk-me
Vulkan/Descriptors: Increase sets per pool on AMD propietary driver.
Diffstat (limited to 'src/video_core/renderer_vulkan')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_descriptor_pool.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp b/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp index adb557f60..d87da2a34 100644 --- a/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp +++ b/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp | |||
| @@ -19,7 +19,6 @@ namespace Vulkan { | |||
| 19 | // Prefer small grow rates to avoid saturating the descriptor pool with barely used pipelines | 19 | // Prefer small grow rates to avoid saturating the descriptor pool with barely used pipelines |
| 20 | constexpr size_t SETS_GROW_RATE = 16; | 20 | constexpr size_t SETS_GROW_RATE = 16; |
| 21 | constexpr s32 SCORE_THRESHOLD = 3; | 21 | constexpr s32 SCORE_THRESHOLD = 3; |
| 22 | constexpr u32 SETS_PER_POOL = 64; | ||
| 23 | 22 | ||
| 24 | struct DescriptorBank { | 23 | struct DescriptorBank { |
| 25 | DescriptorBankInfo info; | 24 | DescriptorBankInfo info; |
| @@ -59,11 +58,12 @@ static DescriptorBankInfo MakeBankInfo(std::span<const Shader::Info> infos) { | |||
| 59 | static void AllocatePool(const Device& device, DescriptorBank& bank) { | 58 | static void AllocatePool(const Device& device, DescriptorBank& bank) { |
| 60 | std::array<VkDescriptorPoolSize, 6> pool_sizes; | 59 | std::array<VkDescriptorPoolSize, 6> pool_sizes; |
| 61 | size_t pool_cursor{}; | 60 | size_t pool_cursor{}; |
| 61 | const u32 sets_per_pool = device.GetSetsPerPool(); | ||
| 62 | const auto add = [&](VkDescriptorType type, u32 count) { | 62 | const auto add = [&](VkDescriptorType type, u32 count) { |
| 63 | if (count > 0) { | 63 | if (count > 0) { |
| 64 | pool_sizes[pool_cursor++] = { | 64 | pool_sizes[pool_cursor++] = { |
| 65 | .type = type, | 65 | .type = type, |
| 66 | .descriptorCount = count * SETS_PER_POOL, | 66 | .descriptorCount = count * sets_per_pool, |
| 67 | }; | 67 | }; |
| 68 | } | 68 | } |
| 69 | }; | 69 | }; |
| @@ -78,7 +78,7 @@ static void AllocatePool(const Device& device, DescriptorBank& bank) { | |||
| 78 | .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, | 78 | .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, |
| 79 | .pNext = nullptr, | 79 | .pNext = nullptr, |
| 80 | .flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, | 80 | .flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, |
| 81 | .maxSets = SETS_PER_POOL, | 81 | .maxSets = sets_per_pool, |
| 82 | .poolSizeCount = static_cast<u32>(pool_cursor), | 82 | .poolSizeCount = static_cast<u32>(pool_cursor), |
| 83 | .pPoolSizes = std::data(pool_sizes), | 83 | .pPoolSizes = std::data(pool_sizes), |
| 84 | })); | 84 | })); |