Non-functional HLSL: Factor out built-ins from splitting and related simplifications.

This commit is contained in:
John Kessenich 2017-08-07 23:40:05 -06:00
parent eaed06823a
commit ecd08bc36c
4 changed files with 40 additions and 49 deletions

View file

@ -423,14 +423,14 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver
return -1;
// no locations added if already present, or a built-in variable
if (type.getQualifier().hasLocation() || type.getQualifier().builtIn != EbvNone)
if (type.getQualifier().hasLocation() || type.isBuiltIn())
return -1;
// no locations on blocks of built-in variables
if (type.isStruct()) {
if (type.getStruct()->size() < 1)
return -1;
if ((*type.getStruct())[0].type->getQualifier().builtIn != EbvNone)
if ((*type.getStruct())[0].type->isBuiltIn())
return -1;
}