mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Explicitly destroy freed descriptor sets in vulkan pixel history
* During replay we don't track which descriptor sets come from which pool, so when re-allocating we get back duplicate handles. For now since the pixel history is the only place that needs to reset, we track and manually free there.
This commit is contained in:
@@ -2956,11 +2956,15 @@ VkDescriptorSet VulkanReplay::GetPixelHistoryDescriptor()
|
||||
m_pDriver->vkAllocateDescriptorSets(m_pDriver->GetDev(), &descSetAllocInfo, &descSet);
|
||||
if(vkr != VK_SUCCESS)
|
||||
RDCERR("Failed creating object");
|
||||
m_PixelHistory.allocedSets.push_back(descSet);
|
||||
return descSet;
|
||||
}
|
||||
|
||||
void VulkanReplay::ResetPixelHistoryDescriptorPool()
|
||||
{
|
||||
for(VkDescriptorSet descset : m_PixelHistory.allocedSets)
|
||||
GetResourceManager()->ReleaseWrappedResource(descset, true);
|
||||
m_PixelHistory.allocedSets.clear();
|
||||
m_pDriver->vkResetDescriptorPool(m_pDriver->GetDev(), m_PixelHistory.MSCopyDescPool, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -683,6 +683,8 @@ private:
|
||||
VkPipeline MSCopyPipe = VK_NULL_HANDLE;
|
||||
VkPipeline MSCopyDepthPipe = VK_NULL_HANDLE;
|
||||
VkPipelineLayout MSCopyPipeLayout = VK_NULL_HANDLE;
|
||||
|
||||
rdcarray<VkDescriptorSet> allocedSets;
|
||||
} m_PixelHistory;
|
||||
|
||||
struct HistogramMinMax
|
||||
|
||||
Reference in New Issue
Block a user