summaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2021-08-29 22:45:17 +0200
committerGravatar Fernando Sahmkow2021-09-13 23:09:18 +0200
commite7ca37b1e5d6dd62870c7b7c953598ad7785c9f9 (patch)
tree8b3b8634c7b6910acdd2bc1363b4770dba2f1397 /src/video_core/renderer_vulkan
parentMerge pull request #6929 from yuzu-emu/revert-6870-trace-back-stack-back-stac... (diff)
downloadyuzu-e7ca37b1e5d6dd62870c7b7c953598ad7785c9f9.tar.gz
yuzu-e7ca37b1e5d6dd62870c7b7c953598ad7785c9f9.tar.xz
yuzu-e7ca37b1e5d6dd62870c7b7c953598ad7785c9f9.zip
Vulkan/Descriptors: Increase sets per pool on AMFD propietary driver.
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_descriptor_pool.cpp6
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 8e77e4796..60e45f1b9 100644
--- a/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp
+++ b/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp
@@ -18,7 +18,6 @@ namespace Vulkan {
18// Prefer small grow rates to avoid saturating the descriptor pool with barely used pipelines 18// Prefer small grow rates to avoid saturating the descriptor pool with barely used pipelines
19constexpr size_t SETS_GROW_RATE = 16; 19constexpr size_t SETS_GROW_RATE = 16;
20constexpr s32 SCORE_THRESHOLD = 3; 20constexpr s32 SCORE_THRESHOLD = 3;
21constexpr u32 SETS_PER_POOL = 64;
22 21
23struct DescriptorBank { 22struct DescriptorBank {
24 DescriptorBankInfo info; 23 DescriptorBankInfo info;
@@ -58,11 +57,12 @@ static DescriptorBankInfo MakeBankInfo(std::span<const Shader::Info> infos) {
58static void AllocatePool(const Device& device, DescriptorBank& bank) { 57static void AllocatePool(const Device& device, DescriptorBank& bank) {
59 std::array<VkDescriptorPoolSize, 6> pool_sizes; 58 std::array<VkDescriptorPoolSize, 6> pool_sizes;
60 size_t pool_cursor{}; 59 size_t pool_cursor{};
60 const u32 sets_per_pool = device.GetSetsPerPool();
61 const auto add = [&](VkDescriptorType type, u32 count) { 61 const auto add = [&](VkDescriptorType type, u32 count) {
62 if (count > 0) { 62 if (count > 0) {
63 pool_sizes[pool_cursor++] = { 63 pool_sizes[pool_cursor++] = {
64 .type = type, 64 .type = type,
65 .descriptorCount = count * SETS_PER_POOL, 65 .descriptorCount = count * sets_per_pool,
66 }; 66 };
67 } 67 }
68 }; 68 };
@@ -77,7 +77,7 @@ static void AllocatePool(const Device& device, DescriptorBank& bank) {
77 .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, 77 .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO,
78 .pNext = nullptr, 78 .pNext = nullptr,
79 .flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, 79 .flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT,
80 .maxSets = SETS_PER_POOL, 80 .maxSets = sets_per_pool,
81 .poolSizeCount = static_cast<u32>(pool_cursor), 81 .poolSizeCount = static_cast<u32>(pool_cursor),
82 .pPoolSizes = std::data(pool_sizes), 82 .pPoolSizes = std::data(pool_sizes),
83 })); 83 }));