Skip to content

Commit

Permalink
DXIL Disassembly use resource alias for resource handle in CBufferLoad
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorro666 committed Oct 31, 2024
1 parent fc109ce commit 3656641
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions renderdoc/driver/shaders/dxil/dxil_disassemble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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 += ")";
Expand All @@ -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;
Expand Down

0 comments on commit 3656641

Please sign in to comment.