diff --git a/renderdoc/driver/gl/gl_replay.h b/renderdoc/driver/gl/gl_replay.h index 51b2b65fa..160e51f8a 100644 --- a/renderdoc/driver/gl/gl_replay.h +++ b/renderdoc/driver/gl/gl_replay.h @@ -349,6 +349,7 @@ public: void SetReplayData(GLWindowingData data); void UseReplayContext() { MakeCurrentReplayContext(&m_ReplayCtx); } + void UseDebugContext() { MakeCurrentReplayContext(m_DebugCtx); } bool IsReplayContext(void *ctx) { return m_ReplayCtx.ctx == NULL || ctx == m_ReplayCtx.ctx; } bool HasDebugContext() { return m_DebugCtx != NULL; } void FillWithDiscardPattern(DiscardType type, GLuint framebuffer, GLsizei numAttachments, diff --git a/renderdoc/driver/gl/gl_shaderdebug.cpp b/renderdoc/driver/gl/gl_shaderdebug.cpp index b2d20c3fa..244cf7f00 100644 --- a/renderdoc/driver/gl/gl_shaderdebug.cpp +++ b/renderdoc/driver/gl/gl_shaderdebug.cpp @@ -1154,6 +1154,8 @@ public: uniformParams.dynoffset.z = offset.value.s32v[2]; } + m_pDriver->GetReplay()->UseReplayContext(); + GLuint prog = m_pDriver->GetReplay()->MakeShaderDebugSampleProg(config); if(prog == 0) @@ -1164,8 +1166,6 @@ public: return false; } - m_pDriver->GetReplay()->UseReplayContext(); - GLMarkerRegion markerRegion("QueueSampleGather"); GLRenderState rs; @@ -1288,7 +1288,7 @@ public: RDCASSERTEQUAL(params[0].type, VarType::Float); - m_pDriver->GetReplay()->UseReplayContext(); + m_pDriver->GetReplay()->UseDebugContext(); GLMarkerRegion markerRegion("QueueCalculateMathOp");