diff --git a/renderdoc/driver/gl/gl_replay.cpp b/renderdoc/driver/gl/gl_replay.cpp index 0feeef765..cbab24419 100644 --- a/renderdoc/driver/gl/gl_replay.cpp +++ b/renderdoc/driver/gl/gl_replay.cpp @@ -44,6 +44,9 @@ RDOC_CONFIG(bool, OpenGL_HardwareCounters, true, "Enable support for IHV-specific hardware counters on OpenGL."); +RDOC_CONFIG(bool, OpenGL_ShaderDebugging, false, + "BETA: Enable experimental shader debugging support."); + static const char *SPIRVDisassemblyTarget = "SPIR-V (RenderDoc)"; GLReplay::GLReplay(WrappedOpenGL *d) @@ -222,6 +225,7 @@ APIProperties GLReplay::GetAPIProperties() ret.degraded = m_Degraded; ret.vendor = m_DriverInfo.vendor; ret.pixelHistory = true; + ret.shaderDebugging = OpenGL_ShaderDebugging(); return ret; } @@ -4292,46 +4296,6 @@ rdcarray GLReplay::GetUsage(ResourceId id) return m_pDriver->GetUsage(id); } -ShaderDebugTrace *GLReplay::DebugVertex(uint32_t eventId, uint32_t vertid, uint32_t instid, - uint32_t idx, uint32_t view) -{ - GLNOTIMP("DebugVertex"); - return new ShaderDebugTrace(); -} - -ShaderDebugTrace *GLReplay::DebugPixel(uint32_t eventId, uint32_t x, uint32_t y, - const DebugPixelInputs &inputs) -{ - GLNOTIMP("DebugPixel"); - return new ShaderDebugTrace(); -} - -ShaderDebugTrace *GLReplay::DebugThread(uint32_t eventId, const rdcfixedarray &groupid, - const rdcfixedarray &threadid) -{ - GLNOTIMP("DebugThread"); - return new ShaderDebugTrace(); -} - -ShaderDebugTrace *GLReplay::DebugMeshThread(uint32_t eventId, - const rdcfixedarray &groupid, - const rdcfixedarray &threadid) -{ - GLNOTIMP("DebugMeshThread"); - return new ShaderDebugTrace(); -} - -rdcarray GLReplay::ContinueDebug(ShaderDebugger *debugger) -{ - GLNOTIMP("ContinueDebug"); - return {}; -} - -void GLReplay::FreeDebugger(ShaderDebugger *debugger) -{ - delete debugger; -} - void GLReplay::MakeCurrentReplayContext(GLWindowingData *ctx) { static GLWindowingData *prev = NULL; diff --git a/renderdoc/driver/gl/gl_shaderdebug.cpp b/renderdoc/driver/gl/gl_shaderdebug.cpp index 89bac38c2..0258f84f9 100644 --- a/renderdoc/driver/gl/gl_shaderdebug.cpp +++ b/renderdoc/driver/gl/gl_shaderdebug.cpp @@ -919,3 +919,42 @@ private: const uint64_t deviceThreadID; }; + +ShaderDebugTrace *GLReplay::DebugVertex(uint32_t eventId, uint32_t vertid, uint32_t instid, + uint32_t idx, uint32_t view) +{ + GLNOTIMP("DebugVertex"); + return new ShaderDebugTrace(); +} + +ShaderDebugTrace *GLReplay::DebugPixel(uint32_t eventId, uint32_t x, uint32_t y, + const DebugPixelInputs &inputs) +{ + GLNOTIMP("DebugPixel"); + return new ShaderDebugTrace(); +} + +ShaderDebugTrace *GLReplay::DebugThread(uint32_t eventId, const rdcfixedarray &groupid, + const rdcfixedarray &threadid) +{ + GLNOTIMP("DebugThread"); + return new ShaderDebugTrace(); +} + +ShaderDebugTrace *GLReplay::DebugMeshThread(uint32_t eventId, + const rdcfixedarray &groupid, + const rdcfixedarray &threadid) +{ + GLNOTIMP("DebugMeshThread"); + return new ShaderDebugTrace(); +} + +rdcarray GLReplay::ContinueDebug(ShaderDebugger *debugger) +{ + return {}; +} + +void GLReplay::FreeDebugger(ShaderDebugger *debugger) +{ + delete debugger; +}