mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-08 14:55:41 +00:00
Let drawcall callbacks specify that all cmd buffers should be re-done
This commit is contained in:
@@ -1857,14 +1857,24 @@ VkBool32 WrappedVulkan::DebugCallback(
|
||||
|
||||
bool WrappedVulkan::ShouldRerecordCmd(ResourceId cmdid)
|
||||
{
|
||||
return m_PartialReplayData.outsideCmdBuffer != VK_NULL_HANDLE ||
|
||||
cmdid == m_PartialReplayData.partialParent;
|
||||
if(m_PartialReplayData.outsideCmdBuffer != VK_NULL_HANDLE)
|
||||
return true;
|
||||
|
||||
if(m_DrawcallCallback && m_DrawcallCallback->RecordAllCmds())
|
||||
return true;
|
||||
|
||||
return cmdid == m_PartialReplayData.partialParent;
|
||||
}
|
||||
|
||||
bool WrappedVulkan::InRerecordRange()
|
||||
{
|
||||
return m_PartialReplayData.outsideCmdBuffer != VK_NULL_HANDLE ||
|
||||
m_BakedCmdBufferInfo[m_PartialReplayData.partialParent].curEventID <= m_LastEventID - m_PartialReplayData.baseEvent;
|
||||
if(m_PartialReplayData.outsideCmdBuffer != VK_NULL_HANDLE)
|
||||
return true;
|
||||
|
||||
if(m_DrawcallCallback && m_DrawcallCallback->RecordAllCmds())
|
||||
return true;
|
||||
|
||||
return m_BakedCmdBufferInfo[m_PartialReplayData.partialParent].curEventID <= m_LastEventID - m_PartialReplayData.baseEvent;
|
||||
}
|
||||
|
||||
VkCommandBuffer WrappedVulkan::RerecordCmdBuf()
|
||||
|
||||
@@ -116,6 +116,11 @@ struct DrawcallCallback
|
||||
virtual void PreDraw(uint32_t eid, VkCommandBuffer cmd) = 0;
|
||||
virtual bool PostDraw(uint32_t eid, VkCommandBuffer cmd) = 0;
|
||||
virtual void PostRedraw(uint32_t eid, VkCommandBuffer cmd) = 0;
|
||||
|
||||
// should we re-record all command buffers? this needs to be true if the range
|
||||
// being replayed is larger than one command buffer (which usually means the
|
||||
// whole frame).
|
||||
virtual bool RecordAllCmds() = 0;
|
||||
};
|
||||
|
||||
class WrappedVulkan : public IFrameCapturer
|
||||
|
||||
@@ -98,6 +98,11 @@ struct GPUTimerCallback : public DrawcallCallback
|
||||
{
|
||||
}
|
||||
|
||||
bool RecordAllCmds()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
WrappedVulkan *m_pDriver;
|
||||
VulkanReplay *m_pReplay;
|
||||
VkQueryPool m_QueryPool;
|
||||
|
||||
@@ -2314,6 +2314,11 @@ struct QuadOverdrawCallback : public DrawcallCallback
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
bool RecordAllCmds()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t m_FrameID;
|
||||
WrappedVulkan *m_pDriver;
|
||||
VulkanDebugManager *m_pDebug;
|
||||
|
||||
@@ -3806,6 +3806,11 @@ struct InitPostVSCallback : public DrawcallCallback
|
||||
{
|
||||
}
|
||||
|
||||
bool RecordAllCmds()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t m_FrameID;
|
||||
WrappedVulkan *m_pDriver;
|
||||
VulkanReplay *m_pReplay;
|
||||
|
||||
Reference in New Issue
Block a user