From 6ed5ac046b74020d8a78ccc89ace31b2dcf19fed Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 13 Sep 2022 15:19:30 +0100 Subject: [PATCH] Don't list a partial callstack for code without debug info --- renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp b/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp index d59de5f91..f3064b1b6 100644 --- a/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp +++ b/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp @@ -1924,6 +1924,12 @@ rdcarray Debugger::ContinueDebug() state.callstack.insert(insertPoint, scope->name); } + // if this instruction has no scope, don't give it a callstack + if(GetScope(endOffs) == NULL) + { + state.callstack.clear(); + } + // move to the next inline up on our inline stack. If we reach an actual function // call, this parent will be NULL as there was no more inlining - the final scope will // refer to the real function which is already on our stack