Skip to content

Commit

Permalink
Disassemble empty struct definitions as {} to match dxc
Browse files Browse the repository at this point in the history
  • Loading branch information
baldurk committed May 27, 2024
1 parent c0b992f commit 10be601
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions renderdoc/driver/shaders/dxil/dxil_disassemble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1391,9 +1391,15 @@ rdcstr Program::DisassembleTypes(int &instructionLine) const
ret += StringFormat::Fmt("%s", t->toString().c_str());
}
if(typ->members.empty())
{
if(ret.back() == ' ')
ret.pop_back();
ret += "}\n";
}
else
{
ret += " }\n";
}

instructionLine++;
printedTypes = true;
Expand Down

0 comments on commit 10be601

Please sign in to comment.