Non-functional: Use isOpaque() instead of compare against EbtSampler.

This commit is contained in:
John Kessenich
2016-10-01 12:35:01 -06:00
parent 47e6fa1cad
commit f571d0c037
3 changed files with 4 additions and 5 deletions

View File

@@ -366,7 +366,7 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& node)
else if (variableType.getBasicType() == EbtBlock)
parseContext.declareBlock(idToken.loc, variableType, idToken.string);
else {
if (variableType.getQualifier().storage == EvqUniform && variableType.getBasicType() != EbtSampler) {
if (variableType.getQualifier().storage == EvqUniform && ! variableType.isOpaque()) {
// this isn't really an individual variable, but a member of the $Global buffer
parseContext.growGlobalUniformBlock(idToken.loc, variableType, *idToken.string);
} else {

View File

@@ -737,8 +737,7 @@ bool HlslParseContext::shouldFlattenUniform(const TType& type) const
return type.isArray() &&
intermediate.getFlattenUniformArrays() &&
qualifier == EvqUniform &&
// Testing the EbtSampler basic type covers samplers and textures
type.getBasicType() == EbtSampler;
type.isOpaque();
}
void HlslParseContext::flatten(const TSourceLoc& loc, const TVariable& variable)