HLSL: Flatten all input/output structs, regardless of stage.

This is needed because an output structure can contain embedded built-ins
(like SV_Position) which should not get locations assigned.
This commit is contained in:
John Kessenich
2016-09-16 01:52:14 -06:00
parent 7dc630f3da
commit f8e494c18c
7 changed files with 53 additions and 38 deletions

View File

@@ -710,8 +710,8 @@ bool HlslParseContext::shouldFlatten(const TType& type)
const TStorageQualifier qualifier = type.getQualifier().storage;
return type.isStruct() &&
((language == EShLangVertex && qualifier == EvqVaryingIn) ||
(language == EShLangFragment && qualifier == EvqVaryingOut));
(qualifier == EvqVaryingIn ||
qualifier == EvqVaryingOut);
}
// Figure out the mapping between a structure's top members and an