From 65ce7ff127b495c751bb528962b74e8dbda6eee3 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Thu, 19 Dec 2024 13:43:31 +0000 Subject: [PATCH] Use the function name if no callstack is generated --- renderdoc/driver/shaders/dxil/dxil_debug.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renderdoc/driver/shaders/dxil/dxil_debug.cpp b/renderdoc/driver/shaders/dxil/dxil_debug.cpp index dd5df3721..96f062c65 100644 --- a/renderdoc/driver/shaders/dxil/dxil_debug.cpp +++ b/renderdoc/driver/shaders/dxil/dxil_debug.cpp @@ -7806,6 +7806,9 @@ ShaderDebugTrace *Debugger::BeginDebug(uint32_t eventId, const DXBC::DXBCContain if(!scope->functionName.empty()) callstack.push_back(scope->functionName); } + // If there is no callstack then use the function name + if(callstack.empty()) + callstack.push_back(f->name); info.callstacks[instructionIndex] = callstack; } // If there is no callstack for the function then use the function name