WIP: HLSL: preserve empty structures after splitting
This commit is contained in:
parent
6e1d50a7a2
commit
4198b8bfc4
8 changed files with 72 additions and 20 deletions
|
|
@ -1444,12 +1444,7 @@ void HlslParseContext::assignLocations(TVariable& variable)
|
|||
assignLocation(**member);
|
||||
} else if (wasSplit(variable.getUniqueId())) {
|
||||
TVariable* splitIoVar = getSplitIoVar(&variable);
|
||||
const TTypeList* structure = splitIoVar->getType().getStruct();
|
||||
// Struct splitting can produce empty structures if the only members of the
|
||||
// struct were builtin interstage IO types. Only assign locations if it
|
||||
// isn't a struct, or is a non-empty struct.
|
||||
if (structure == nullptr || !structure->empty())
|
||||
assignLocation(*splitIoVar);
|
||||
assignLocation(*splitIoVar);
|
||||
} else {
|
||||
assignLocation(variable);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue