mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Don't omit opaque types for real empty structs in DXIL editing
This commit is contained in:
@@ -754,6 +754,7 @@ Program::Program(const byte *bytes, size_t length)
|
||||
{
|
||||
// pretend opaque types are empty structs
|
||||
m_Types[typeIndex].type = Type::Struct;
|
||||
m_Types[typeIndex].opaque = true;
|
||||
|
||||
typeIndex++;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ struct Type
|
||||
const Type *inner = NULL;
|
||||
|
||||
// struct or function
|
||||
bool packedStruct = false, vararg = false;
|
||||
bool packedStruct = false, vararg = false, opaque = false;
|
||||
uint16_t id = 0xFFFF;
|
||||
rdcstr name;
|
||||
rdcarray<const Type *> members; // the members for a struct, the parameters for functions
|
||||
|
||||
@@ -1020,7 +1020,7 @@ bytebuf ProgramEditor::EncodeProgram() const
|
||||
}
|
||||
else if(m_Types[i].type == Type::Struct)
|
||||
{
|
||||
if(m_Types[i].members.empty())
|
||||
if(m_Types[i].opaque)
|
||||
{
|
||||
writer.Record(LLVMBC::TypeRecord::OPAQUE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user