Skip to content

Commit

Permalink
We somehow lost the usage_ counter increment in VulkanDescSetPool, fi…
Browse files Browse the repository at this point in the history
…x that
  • Loading branch information
hrydgard committed Oct 9, 2023
1 parent 34710ec commit bb38210
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Common/GPU/Vulkan/VulkanDescSet.cpp
Expand Up @@ -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;
}
Expand Down
6 changes: 1 addition & 5 deletions GPU/Vulkan/DrawEngineVulkan.cpp
Expand Up @@ -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 };

Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion GPU/Vulkan/DrawEngineVulkan.h
Expand Up @@ -259,7 +259,6 @@ class DrawEngineVulkan : public DrawEngineCommon {

PrehashMap<VertexArrayInfoVulkan *> vai_;
VulkanPushBuffer *vertexCache_;
int descDecimationCounter_ = 0;

struct DescriptorSetKey {
VkImageView imageView_;
Expand Down

0 comments on commit bb38210

Please sign in to comment.