HLSL: Remove extraneous built-in member decorations for IO structs used in non-IO situations.

This commit is contained in:
John Kessenich
2016-09-19 22:16:09 -06:00
parent 86f7138706
commit 6b71c400f8
56 changed files with 724 additions and 769 deletions

View File

@@ -717,6 +717,9 @@ bool HlslParseContext::shouldFlatten(const TType& type) const
// Figure out the mapping between an aggregate's top members and an
// equivalent set of individual variables.
//
// N.B. Erases memory of I/O-related annotations in the original type's member,
// effecting a transfer of this information to the flattened variable form.
//
// Assumes shouldFlatten() or equivalent was called first.
//
// TODO: generalize this to arbitrary nesting?
@@ -730,6 +733,9 @@ void HlslParseContext::flatten(const TVariable& variable)
*members[member].type);
mergeQualifiers(memberVariable->getWritableType().getQualifier(), variable.getType().getQualifier());
memberVariables.push_back(memberVariable);
// N.B. Erase I/O-related annotations from the source-type member.
members[member].type->getQualifier().makeTemporary();
}
flattenMap[variable.getUniqueId()] = memberVariables;