mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Don't destroy events that we back into persistently recorded cmd buffers
This commit is contained in:
@@ -377,6 +377,7 @@ private:
|
||||
|
||||
vector<VkDeviceMemory> m_CleanupMems;
|
||||
vector<VkEvent> m_CleanupEvents;
|
||||
vector<VkEvent> m_PersistentEvents;
|
||||
|
||||
const VkPhysicalDeviceProperties &GetDeviceProps() { return m_PhysicalDeviceData.props; }
|
||||
VkDriverInfo GetDriverVersion() { return VkDriverInfo(m_PhysicalDeviceData.props); }
|
||||
|
||||
@@ -418,6 +418,12 @@ void WrappedVulkan::Shutdown()
|
||||
SubmitSemaphores();
|
||||
FlushQ();
|
||||
|
||||
// destroy any events we created for waiting on
|
||||
for(size_t i = 0; i < m_PersistentEvents.size(); i++)
|
||||
ObjDisp(GetDev())->DestroyEvent(Unwrap(GetDev()), m_PersistentEvents[i], NULL);
|
||||
|
||||
m_PersistentEvents.clear();
|
||||
|
||||
// since we didn't create proper registered resources for our command buffers,
|
||||
// they won't be taken down properly with the pool. So we release them (just our
|
||||
// data) here.
|
||||
|
||||
@@ -765,8 +765,9 @@ bool WrappedVulkan::Serialise_vkCmdWaitEvents(
|
||||
(uint32_t)bufBarriers.size(), &bufBarriers[0],
|
||||
(uint32_t)imgBarriers.size(), &imgBarriers[0]);
|
||||
|
||||
// register to clean this event up once we're done replaying this section of the log
|
||||
m_CleanupEvents.push_back(ev);
|
||||
// since we cache and replay this command buffer we can't clean up this event just when we're
|
||||
// done replaying this section. We have to keep this event until shutdown
|
||||
m_PersistentEvents.push_back(ev);
|
||||
|
||||
ResourceId cmd = GetResID(cmdBuffer);
|
||||
GetResourceManager()->RecordBarriers(m_BakedCmdBufferInfo[cmd].imgbarriers, m_ImageLayouts,
|
||||
|
||||
Reference in New Issue
Block a user