mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Remove start event ID from replaylog call.
* Any uses of this for replaying subsections of the frame are to be implemented under the replay driver level, as it's too onerous to require that the replay driver be able to replay arbitrary subsections or to communicate granularity up to the above layer.
This commit is contained in:
@@ -119,7 +119,7 @@ class ImageViewer : public IReplayDriver
|
||||
GLPipelineState GetGLPipelineState() { return GLPipelineState(); }
|
||||
VulkanPipelineState GetVulkanPipelineState() { return VulkanPipelineState(); }
|
||||
void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv) {}
|
||||
void ReplayLog(uint32_t frameID, uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType) {}
|
||||
void ReplayLog(uint32_t frameID, uint32_t endEventID, ReplayLogType replayType) {}
|
||||
vector<uint32_t> GetPassEvents(uint32_t frameID, uint32_t eventID) { return vector<uint32_t>(); }
|
||||
vector<EventUsage> GetUsage(ResourceId id) { return vector<EventUsage>(); }
|
||||
bool IsRenderOutput(ResourceId id) { return false; }
|
||||
|
||||
@@ -1288,7 +1288,7 @@ bool ProxySerialiser::Tick()
|
||||
SetContextFilter(ResourceId(), 0, 0);
|
||||
break;
|
||||
case eCommand_ReplayLog:
|
||||
ReplayLog(0, 0, 0, (ReplayLogType)0);
|
||||
ReplayLog(0, 0, (ReplayLogType)0);
|
||||
break;
|
||||
case eCommand_GetPassEvents:
|
||||
GetPassEvents(0, 0);
|
||||
@@ -1612,16 +1612,15 @@ void ProxySerialiser::SetContextFilter(ResourceId id, uint32_t firstDefEv, uint3
|
||||
}
|
||||
}
|
||||
|
||||
void ProxySerialiser::ReplayLog(uint32_t frameID, uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType)
|
||||
void ProxySerialiser::ReplayLog(uint32_t frameID, uint32_t endEventID, ReplayLogType replayType)
|
||||
{
|
||||
m_ToReplaySerialiser->Serialise("", frameID);
|
||||
m_ToReplaySerialiser->Serialise("", startEventID);
|
||||
m_ToReplaySerialiser->Serialise("", endEventID);
|
||||
m_ToReplaySerialiser->Serialise("", replayType);
|
||||
|
||||
if(m_ReplayHost)
|
||||
{
|
||||
m_Remote->ReplayLog(frameID, startEventID, endEventID, replayType);
|
||||
m_Remote->ReplayLog(frameID, endEventID, replayType);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -335,7 +335,7 @@ class ProxySerialiser : public IReplayDriver, Callstack::StackResolver
|
||||
VulkanPipelineState GetVulkanPipelineState() { return m_VulkanPipelineState; }
|
||||
|
||||
void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv);
|
||||
void ReplayLog(uint32_t frameID, uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType);
|
||||
void ReplayLog(uint32_t frameID, uint32_t endEventID, ReplayLogType replayType);
|
||||
|
||||
vector<uint32_t> GetPassEvents(uint32_t frameID, uint32_t eventID);
|
||||
|
||||
|
||||
@@ -1238,9 +1238,9 @@ void D3D11Replay::SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t
|
||||
m_pDevice->SetContextFilter(id, firstDefEv, lastDefEv);
|
||||
}
|
||||
|
||||
void D3D11Replay::ReplayLog(uint32_t frameID, uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType)
|
||||
void D3D11Replay::ReplayLog(uint32_t frameID, uint32_t endEventID, ReplayLogType replayType)
|
||||
{
|
||||
m_pDevice->ReplayLog(frameID, startEventID, endEventID, replayType);
|
||||
m_pDevice->ReplayLog(frameID, 0, endEventID, replayType);
|
||||
}
|
||||
|
||||
vector<uint32_t> D3D11Replay::GetPassEvents(uint32_t frameID, uint32_t eventID)
|
||||
|
||||
@@ -69,7 +69,7 @@ class D3D11Replay : public IReplayDriver
|
||||
|
||||
void ReadLogInitialisation();
|
||||
void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv);
|
||||
void ReplayLog(uint32_t frameID, uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType);
|
||||
void ReplayLog(uint32_t frameID, uint32_t endEventID, ReplayLogType replayType);
|
||||
|
||||
vector<uint32_t> GetPassEvents(uint32_t frameID, uint32_t eventID);
|
||||
|
||||
|
||||
@@ -1855,7 +1855,7 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, TextureDisplayOverlay overl
|
||||
float colVal[] = { 0.8f, 0.1f, 0.8f, 1.0f };
|
||||
gl.glProgramUniform4fv(DebugData.genericFSProg, colLoc, 1, colVal);
|
||||
|
||||
ReplayLog(frameID, 0, eventID, eReplay_OnlyDraw);
|
||||
ReplayLog(frameID, eventID, eReplay_OnlyDraw);
|
||||
}
|
||||
else if(overlay == eTexOverlay_Wireframe)
|
||||
{
|
||||
@@ -1868,7 +1868,7 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, TextureDisplayOverlay overl
|
||||
|
||||
gl.glPolygonMode(eGL_FRONT_AND_BACK, eGL_LINE);
|
||||
|
||||
ReplayLog(frameID, 0, eventID, eReplay_OnlyDraw);
|
||||
ReplayLog(frameID, eventID, eReplay_OnlyDraw);
|
||||
}
|
||||
else if(overlay == eTexOverlay_ViewportScissor)
|
||||
{
|
||||
@@ -1922,7 +1922,7 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, TextureDisplayOverlay overl
|
||||
float red[] = { 1.0f, 0.0f, 0.0f, 1.0f };
|
||||
gl.glProgramUniform4fv(DebugData.genericFSProg, colLoc, 1, red);
|
||||
|
||||
ReplayLog(frameID, 0, eventID, eReplay_OnlyDraw);
|
||||
ReplayLog(frameID, eventID, eReplay_OnlyDraw);
|
||||
|
||||
GLuint curDepth = 0, curStencil = 0;
|
||||
|
||||
@@ -2018,7 +2018,7 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, TextureDisplayOverlay overl
|
||||
0, 0, DebugData.overlayTexWidth, DebugData.overlayTexHeight,
|
||||
GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, eGL_NEAREST);
|
||||
|
||||
ReplayLog(frameID, 0, eventID, eReplay_OnlyDraw);
|
||||
ReplayLog(frameID, eventID, eReplay_OnlyDraw);
|
||||
|
||||
// unset depth/stencil textures from overlay FBO and delete temp depth/stencil
|
||||
if(curDepth != 0 && curDepth == curStencil)
|
||||
@@ -2041,7 +2041,7 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, TextureDisplayOverlay overl
|
||||
GLint colLoc = gl.glGetUniformLocation(DebugData.genericFSProg, "RENDERDOC_GenericFS_Color");
|
||||
gl.glProgramUniform4fv(DebugData.genericFSProg, colLoc, 1, col);
|
||||
|
||||
ReplayLog(frameID, 0, eventID, eReplay_OnlyDraw);
|
||||
ReplayLog(frameID, eventID, eReplay_OnlyDraw);
|
||||
|
||||
// only enable cull face if it was enabled originally (otherwise
|
||||
// we just render green over the exact same area, so it shows up "passing")
|
||||
@@ -2053,7 +2053,7 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, TextureDisplayOverlay overl
|
||||
|
||||
gl.glProgramUniform4fv(DebugData.genericFSProg, colLoc, 1, col);
|
||||
|
||||
ReplayLog(frameID, 0, eventID, eReplay_OnlyDraw);
|
||||
ReplayLog(frameID, eventID, eReplay_OnlyDraw);
|
||||
}
|
||||
else if(overlay == eTexOverlay_ClearBeforeDraw || overlay == eTexOverlay_ClearBeforePass)
|
||||
{
|
||||
@@ -2067,7 +2067,7 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, TextureDisplayOverlay overl
|
||||
if(!events.empty())
|
||||
{
|
||||
if(overlay == eTexOverlay_ClearBeforePass)
|
||||
ReplayLog(frameID, 0, events[0], eReplay_WithoutDraw);
|
||||
ReplayLog(frameID, events[0], eReplay_WithoutDraw);
|
||||
else
|
||||
gl.glBindFramebuffer(eGL_FRAMEBUFFER, rs.DrawFBO); // if we don't replay the real state, restore drawFBO to clear it
|
||||
|
||||
@@ -2077,14 +2077,14 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, TextureDisplayOverlay overl
|
||||
|
||||
for(size_t i=0; i < events.size(); i++)
|
||||
{
|
||||
ReplayLog(frameID, events[i], events[i], eReplay_OnlyDraw);
|
||||
ReplayLog(frameID, events[i], eReplay_OnlyDraw);
|
||||
|
||||
if(overlay == eTexOverlay_ClearBeforePass)
|
||||
{
|
||||
ReplayLog(frameID, events[i], events[i], eReplay_OnlyDraw);
|
||||
ReplayLog(frameID, events[i], eReplay_OnlyDraw);
|
||||
|
||||
if(i+1 < events.size())
|
||||
ReplayLog(frameID, events[i], events[i+1], eReplay_WithoutDraw);
|
||||
ReplayLog(frameID, events[i+1], eReplay_WithoutDraw);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2152,7 +2152,7 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, TextureDisplayOverlay overl
|
||||
gl.glFramebufferTexture(eGL_FRAMEBUFFER, eGL_DEPTH_STENCIL_ATTACHMENT, quadtexs[1], 0);
|
||||
|
||||
if(overlay == eTexOverlay_QuadOverdrawPass)
|
||||
ReplayLog(frameID, 0, events[0], eReplay_WithoutDraw);
|
||||
ReplayLog(frameID, events[0], eReplay_WithoutDraw);
|
||||
else
|
||||
rs.ApplyState(m_pDriver->GetCtx(), m_pDriver);
|
||||
|
||||
@@ -2218,7 +2218,7 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, TextureDisplayOverlay overl
|
||||
0, 0, texDetails.width, texDetails.height,
|
||||
GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, eGL_NEAREST);
|
||||
|
||||
ReplayLog(frameID, events[i], events[i], eReplay_OnlyDraw);
|
||||
m_pDriver->ReplayLog(frameID, 0, events[i], eReplay_OnlyDraw);
|
||||
|
||||
// pop the state that we messed with
|
||||
{
|
||||
@@ -2240,10 +2240,10 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, TextureDisplayOverlay overl
|
||||
|
||||
if(overlay == eTexOverlay_QuadOverdrawPass)
|
||||
{
|
||||
ReplayLog(frameID, events[i], events[i], eReplay_OnlyDraw);
|
||||
m_pDriver->ReplayLog(frameID, 0, events[i], eReplay_OnlyDraw);
|
||||
|
||||
if(i+1 < events.size())
|
||||
ReplayLog(frameID, events[i], events[i+1], eReplay_WithoutDraw);
|
||||
m_pDriver->ReplayLog(frameID, events[i], events[i+1], eReplay_WithoutDraw);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2287,7 +2287,7 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, TextureDisplayOverlay overl
|
||||
gl.glDeleteTextures(3, quadtexs);
|
||||
|
||||
if(overlay == eTexOverlay_QuadOverdrawPass)
|
||||
ReplayLog(frameID, 0, eventID, eReplay_WithoutDraw);
|
||||
ReplayLog(frameID, eventID, eReplay_WithoutDraw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,10 +65,10 @@ void GLReplay::ReadLogInitialisation()
|
||||
m_pDriver->ReadLogInitialisation();
|
||||
}
|
||||
|
||||
void GLReplay::ReplayLog(uint32_t frameID, uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType)
|
||||
void GLReplay::ReplayLog(uint32_t frameID, uint32_t endEventID, ReplayLogType replayType)
|
||||
{
|
||||
MakeCurrentReplayContext(&m_ReplayCtx);
|
||||
m_pDriver->ReplayLog(frameID, startEventID, endEventID, replayType);
|
||||
m_pDriver->ReplayLog(frameID, 0, endEventID, replayType);
|
||||
}
|
||||
|
||||
vector<uint32_t> GLReplay::GetPassEvents(uint32_t frameID, uint32_t eventID)
|
||||
|
||||
@@ -115,7 +115,7 @@ class GLReplay : public IReplayDriver
|
||||
|
||||
void ReadLogInitialisation();
|
||||
void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv);
|
||||
void ReplayLog(uint32_t frameID, uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType);
|
||||
void ReplayLog(uint32_t frameID, uint32_t endEventID, ReplayLogType replayType);
|
||||
|
||||
vector<uint32_t> GetPassEvents(uint32_t frameID, uint32_t eventID);
|
||||
|
||||
|
||||
@@ -530,9 +530,9 @@ void VulkanReplay::ReadLogInitialisation()
|
||||
m_pDriver->ReadLogInitialisation();
|
||||
}
|
||||
|
||||
void VulkanReplay::ReplayLog(uint32_t frameID, uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType)
|
||||
void VulkanReplay::ReplayLog(uint32_t frameID, uint32_t endEventID, ReplayLogType replayType)
|
||||
{
|
||||
m_pDriver->ReplayLog(frameID, startEventID, endEventID, replayType);
|
||||
m_pDriver->ReplayLog(frameID, 0, endEventID, replayType);
|
||||
}
|
||||
|
||||
vector<uint32_t> VulkanReplay::GetPassEvents(uint32_t frameID, uint32_t eventID)
|
||||
|
||||
@@ -101,7 +101,7 @@ class VulkanReplay : public IReplayDriver
|
||||
|
||||
void ReadLogInitialisation();
|
||||
void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv);
|
||||
void ReplayLog(uint32_t frameID, uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType);
|
||||
void ReplayLog(uint32_t frameID, uint32_t endEventID, ReplayLogType replayType);
|
||||
|
||||
vector<uint32_t> GetPassEvents(uint32_t frameID, uint32_t eventID);
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ class IRemoteDriver
|
||||
|
||||
virtual void ReadLogInitialisation() = 0;
|
||||
virtual void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv) = 0;
|
||||
virtual void ReplayLog(uint32_t frameID, uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType) = 0;
|
||||
virtual void ReplayLog(uint32_t frameID, uint32_t endEventID, ReplayLogType replayType) = 0;
|
||||
|
||||
virtual vector<uint32_t> GetPassEvents(uint32_t frameID, uint32_t eventID) = 0;
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ void ReplayOutput::RefreshOverlay()
|
||||
{
|
||||
m_pDevice->InitPostVSBuffers(m_FrameID, passEvents);
|
||||
|
||||
m_pDevice->ReplayLog(m_FrameID, 0, m_EventID, eReplay_WithoutDraw);
|
||||
m_pDevice->ReplayLog(m_FrameID, m_EventID, eReplay_WithoutDraw);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -488,15 +488,15 @@ void ReplayOutput::DisplayTex()
|
||||
{
|
||||
if(m_OverlayDirty)
|
||||
{
|
||||
m_pDevice->ReplayLog(m_FrameID, 0, m_EventID, eReplay_WithoutDraw);
|
||||
m_pDevice->ReplayLog(m_FrameID, m_EventID, eReplay_WithoutDraw);
|
||||
RefreshOverlay();
|
||||
m_pDevice->ReplayLog(m_FrameID, 0, m_EventID, eReplay_OnlyDraw);
|
||||
m_pDevice->ReplayLog(m_FrameID, m_EventID, eReplay_OnlyDraw);
|
||||
}
|
||||
}
|
||||
else if(m_ForceOverlayRefresh)
|
||||
{
|
||||
m_ForceOverlayRefresh = false;
|
||||
m_pDevice->ReplayLog(m_FrameID, 0, m_EventID, eReplay_Full);
|
||||
m_pDevice->ReplayLog(m_FrameID, m_EventID, eReplay_Full);
|
||||
}
|
||||
|
||||
if(m_RenderData.texDisplay.CustomShader != ResourceId())
|
||||
@@ -562,9 +562,9 @@ void ReplayOutput::DisplayMesh()
|
||||
|
||||
if(draw && m_OverlayDirty)
|
||||
{
|
||||
m_pDevice->ReplayLog(m_FrameID, 0, m_EventID, eReplay_WithoutDraw);
|
||||
m_pDevice->ReplayLog(m_FrameID, m_EventID, eReplay_WithoutDraw);
|
||||
RefreshOverlay();
|
||||
m_pDevice->ReplayLog(m_FrameID, 0, m_EventID, eReplay_OnlyDraw);
|
||||
m_pDevice->ReplayLog(m_FrameID, m_EventID, eReplay_OnlyDraw);
|
||||
}
|
||||
|
||||
m_pDevice->BindOutputWindow(m_MainOutput.outputID, true);
|
||||
|
||||
@@ -197,14 +197,14 @@ bool ReplayRenderer::SetFrameEvent(uint32_t frameID, uint32_t eventID, bool forc
|
||||
m_FrameID = frameID;
|
||||
m_EventID = eventID;
|
||||
|
||||
m_pDevice->ReplayLog(frameID, 0, eventID, eReplay_WithoutDraw);
|
||||
m_pDevice->ReplayLog(frameID, eventID, eReplay_WithoutDraw);
|
||||
|
||||
FetchPipelineState();
|
||||
|
||||
for(size_t i=0; i < m_Outputs.size(); i++)
|
||||
m_Outputs[i]->SetFrameEvent(frameID, eventID);
|
||||
|
||||
m_pDevice->ReplayLog(frameID, 0, eventID, eReplay_OnlyDraw);
|
||||
m_pDevice->ReplayLog(frameID, eventID, eReplay_OnlyDraw);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1312,11 +1312,11 @@ ReplayOutput *ReplayRenderer::CreateOutput(void *wndhandle, OutputType type)
|
||||
|
||||
m_Outputs.push_back(out);
|
||||
|
||||
m_pDevice->ReplayLog(m_FrameID, 0, m_EventID, eReplay_WithoutDraw);
|
||||
m_pDevice->ReplayLog(m_FrameID, m_EventID, eReplay_WithoutDraw);
|
||||
|
||||
out->SetFrameEvent(m_FrameID, m_EventID);
|
||||
|
||||
m_pDevice->ReplayLog(m_FrameID, 0, m_EventID, eReplay_OnlyDraw);
|
||||
m_pDevice->ReplayLog(m_FrameID, m_EventID, eReplay_OnlyDraw);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user