We somehow lost the usage_ counter increment in VulkanDescSetPool, fix that

This commit is contained in:
Henrik Rydgård committed 2023-10-09 17:01:35 +02:00
1 parent 34710ec750
commit bb38210cfb
3 files changed
+3 -6

No files matched your search

+2
View File
@@ -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;
}
+1 -5
View File
@@ -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;
-1
View File
@@ -259,7 +259,6 @@ private:
PrehashMap<VertexArrayInfoVulkan *> vai_;
VulkanPushBuffer *vertexCache_;
int descDecimationCounter_ = 0;
struct DescriptorSetKey {
VkImageView imageView_;