From 9fdc7e237299755f2dd20934c39b07add6b9ee00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 10 Oct 2023 08:59:47 +0200 Subject: [PATCH] Address feedback --- Common/GPU/Vulkan/VulkanRenderManager.cpp | 5 +++-- Common/UI/Context.cpp | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Common/GPU/Vulkan/VulkanRenderManager.cpp b/Common/GPU/Vulkan/VulkanRenderManager.cpp index 6ec9ca4a9e..f6af92c35c 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.cpp +++ b/Common/GPU/Vulkan/VulkanRenderManager.cpp @@ -1647,7 +1647,8 @@ VKRPipelineLayout *VulkanRenderManager::CreatePipelineLayout(BindingType *bindin vulkan_->SetDebugName(layout->pipelineLayout, VK_OBJECT_TYPE_PIPELINE_LAYOUT, tag); for (int i = 0; i < VulkanContext::MAX_INFLIGHT_FRAMES; i++) { - layout->frameData[i].pool.Create(vulkan_, bindingTypes, (uint32_t)bindingTypesCount, 512); + // Some games go beyond 1024 and end up having to resize like GTA, but most stay below so we start there. + layout->frameData[i].pool.Create(vulkan_, bindingTypes, (uint32_t)bindingTypesCount, 1024); layout->frameData[i].pool.Setup([]() {}); } @@ -1712,7 +1713,7 @@ void VKRPipelineLayout::FlushDescSets(VulkanContext *vulkan, int frame, QueuePro auto &d = descSets[index]; // This is where we look up to see if we already have an identical descriptor previously in the array. - // We could do a simple custom hash map here that doesn't handle collisions, since false positives aren't too bad. + // We could do a simple custom hash map here that doesn't handle collisions, since those won't matter. // Instead, for now we just check history one item backwards. Good enough, it seems. if (index > start + 1) { if (descSets[index - 1].count == d.count) { diff --git a/Common/UI/Context.cpp b/Common/UI/Context.cpp index a660ece765..31b59419ed 100644 --- a/Common/UI/Context.cpp +++ b/Common/UI/Context.cpp @@ -83,6 +83,8 @@ void UIContext::BeginPipeline(Draw::Pipeline *pipeline, Draw::SamplerState *samp // Also clear out any other textures bound. Draw::SamplerState *samplers[3]{ samplerState }; draw_->BindSamplerStates(0, 3, samplers); + Draw::Texture *textures[2]{}; + draw_->BindTextures(1, 2, textures); RebindTexture(); UIBegin(pipeline); }