diff --git a/renderdoc/driver/shaders/spirv/spirv_debug.cpp b/renderdoc/driver/shaders/spirv/spirv_debug.cpp index 2dd0565fe..87dc1f14d 100644 --- a/renderdoc/driver/shaders/spirv/spirv_debug.cpp +++ b/renderdoc/driver/shaders/spirv/spirv_debug.cpp @@ -103,6 +103,8 @@ void ThreadState::EnterFunction(const rdcarray &arguments) // if there's a previous stack frame, save its live list if(!callstack.empty()) { + // process the outgoing scope + ProcessScopeChange(live, {}); callstack.back()->live = live; callstack.back()->sourceVars = sourceVars; } @@ -110,8 +112,6 @@ void ThreadState::EnterFunction(const rdcarray &arguments) // start with just globals live = debugger.GetLiveGlobals(); sourceVars = debugger.GetGlobalSourceVars(); - // process the outgoing scope - ProcessScopeChange(frame->live, live); callstack.push_back(frame);