mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-26 09:21:37 +00:00
Always show DebugValue in SPIR-V disassembly. Closes #2823
* These were previously hidden by default since they generate a fair amount of noise in the disassembly which is not neccessarily directly useful. * The problem is that DebugValues are steppable and so will generate an instruction in the debugging, but without a disassembly line you can have two different 'instructions' on the same disassembly line but with different source lines: > DebugLine 100 > DebugValue ... > DebugLine 101 > OpSomething ... In this case the DebugValue and OpSomething will both have the same disassembly line, but different source lines. This means it is impossible to reliably place a disassembly breakpoint and know which instruction to stop on, and produces some odd effects when stepping in asm (it will step to the DebugValue then the OpSomething and not visibly move). * Overall the reduction in readability is worth this fix, especially considering that when debug info is present is exactly when people are least likely to be using the disassembly at all.
This commit is contained in:
@@ -28,9 +28,6 @@
|
||||
#include "spirv_op_helpers.h"
|
||||
#include "spirv_reflect.h"
|
||||
|
||||
RDOC_CONFIG(bool, Vulkan_Debug_ShowDebugValues, false,
|
||||
"Show DebugValue instructions in shader disassembly.");
|
||||
|
||||
struct StructuredCFG
|
||||
{
|
||||
enum
|
||||
@@ -1603,15 +1600,15 @@ rdcstr Reflector::Disassemble(const rdcstr &entryPoint,
|
||||
|
||||
ret += ")";
|
||||
}
|
||||
else if(dbg.inst == ShaderDbg::Value && Vulkan_Debug_ShowDebugValues())
|
||||
else if(dbg.inst == ShaderDbg::Value)
|
||||
{
|
||||
OpShaderDbg localVar(GetID(dbg.arg<Id>(0)));
|
||||
ret += indent;
|
||||
ret += "// DebugValue(";
|
||||
ret += idName(dbg.arg<Id>(1));
|
||||
ret += " = ";
|
||||
ret += " is ";
|
||||
ret += idName(localVar.arg<Id>(0));
|
||||
ret += " ";
|
||||
ret += " @ ";
|
||||
ret += idName(localVar.arg<Id>(2));
|
||||
ret += ":";
|
||||
ret += idName(localVar.arg<Id>(3));
|
||||
|
||||
Reference in New Issue
Block a user