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:
baldurk
2020-07-16 14:40:27 +01:00
parent 78aa55681a
commit dbce13e434
2 changed files with 6 additions and 0 deletions
@@ -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);
}
+2
View File
@@ -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