From bb38210cfbb5512b30c0e39a6901048a5d5b2f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 9 Oct 2023 17:01:35 +0200 Subject: [PATCH] We somehow lost the usage_ counter increment in VulkanDescSetPool, fix that --- Common/GPU/Vulkan/VulkanDescSet.cpp | 2 ++ GPU/Vulkan/DrawEngineVulkan.cpp | 6 +----- GPU/Vulkan/DrawEngineVulkan.h | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Common/GPU/Vulkan/VulkanDescSet.cpp b/Common/GPU/Vulkan/VulkanDescSet.cpp index 299c8a601884..06c2cc48fdff 100644 --- a/Common/GPU/Vulkan/VulkanDescSet.cpp +++ b/Common/GPU/Vulkan/VulkanDescSet.cpp @@ -73,6 +73,8 @@ VkDescriptorSet VulkanDescSetPool::Allocate(int n, const VkDescriptorSetLayout * return VK_NULL_HANDLE; } + usage_++; + vulkan_->SetDebugName(desc, VK_OBJECT_TYPE_DESCRIPTOR_SET, tag); return desc; } diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index 37e20e7632f7..a2e2128401a6 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -59,7 +59,6 @@ enum { }; #define VERTEXCACHE_DECIMATION_INTERVAL 17 -#define DESCRIPTORSET_DECIMATION_INTERVAL 1 // Temporarily cut to 1. Handle reuse breaks this when textures get deleted. enum { VAI_KILL_AGE = 120, VAI_UNRELIABLE_KILL_AGE = 240, VAI_UNRELIABLE_KILL_MAX = 4 }; @@ -242,10 +241,7 @@ void DrawEngineVulkan::BeginFrame() { vertexCache_->BeginNoReset(); - if (--descDecimationCounter_ <= 0) { - frame->descPool.Reset(); - descDecimationCounter_ = DESCRIPTORSET_DECIMATION_INTERVAL; - } + frame->descPool.Reset(); if (--decimationCounter_ <= 0) { decimationCounter_ = VERTEXCACHE_DECIMATION_INTERVAL; diff --git a/GPU/Vulkan/DrawEngineVulkan.h b/GPU/Vulkan/DrawEngineVulkan.h index 7e8bbf5e1059..261b70e08126 100644 --- a/GPU/Vulkan/DrawEngineVulkan.h +++ b/GPU/Vulkan/DrawEngineVulkan.h @@ -259,7 +259,6 @@ class DrawEngineVulkan : public DrawEngineCommon { PrehashMap vai_; VulkanPushBuffer *vertexCache_; - int descDecimationCounter_ = 0; struct DescriptorSetKey { VkImageView imageView_;