From 365664119485c44dfd3f0d9cf467a2893c6978e6 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Thu, 31 Oct 2024 14:16:05 +0000 Subject: [PATCH] DXIL Disassembly use resource alias for resource handle in CBufferLoad --- renderdoc/driver/shaders/dxil/dxil_disassemble.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/renderdoc/driver/shaders/dxil/dxil_disassemble.cpp b/renderdoc/driver/shaders/dxil/dxil_disassemble.cpp index ef0bb27323..5f962747fe 100644 --- a/renderdoc/driver/shaders/dxil/dxil_disassemble.cpp +++ b/renderdoc/driver/shaders/dxil/dxil_disassemble.cpp @@ -3538,6 +3538,7 @@ void Program::MakeRDDisassemblyString(const DXBC::Reflection *reflection) DXILDebug::Id handleId = GetSSAId(inst.args[1]); const ResourceReference *resRef = GetResourceReference(handleId); rdcstr handleStr = GetArgId(inst, 1); + rdcstr resName = GetHandleAlias(handleStr); bool useFallback = true; if(entryPoint && resRef) { @@ -3570,13 +3571,13 @@ void Program::MakeRDDisassemblyString(const DXBC::Reflection *reflection) } } lineStr += - MakeCBufferRegisterStr(regIndex, bytesPerElement, cbuffer, handleStr); + MakeCBufferRegisterStr(regIndex, bytesPerElement, cbuffer, resName); commentStr += " cbuffer = " + resource.name; commentStr += ", byte_offset = " + ToStr(regIndex * 16); } else { - lineStr += handleStr; + lineStr += resName; lineStr += ".Load4("; lineStr += "byte_offset = " + ToStr(regIndex * 16); lineStr += ")"; @@ -3585,7 +3586,7 @@ void Program::MakeRDDisassemblyString(const DXBC::Reflection *reflection) } if(useFallback) { - lineStr += GetHandleAlias(handleStr); + lineStr += resName; lineStr += ".Load4("; lineStr += "byte_offset = "; uint32_t regIndex;