Commit f571d0c0 by John Kessenich

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

parent 47e6fa1c
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits. // For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run). // For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.1528" #define GLSLANG_REVISION "Overload400-PrecQual.1541"
#define GLSLANG_DATE "29-Sep-2016" #define GLSLANG_DATE "01-Oct-2016"
...@@ -366,7 +366,7 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& node) ...@@ -366,7 +366,7 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& node)
else if (variableType.getBasicType() == EbtBlock) else if (variableType.getBasicType() == EbtBlock)
parseContext.declareBlock(idToken.loc, variableType, idToken.string); parseContext.declareBlock(idToken.loc, variableType, idToken.string);
else { 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 // this isn't really an individual variable, but a member of the $Global buffer
parseContext.growGlobalUniformBlock(idToken.loc, variableType, *idToken.string); parseContext.growGlobalUniformBlock(idToken.loc, variableType, *idToken.string);
} else { } else {
......
...@@ -737,8 +737,7 @@ bool HlslParseContext::shouldFlattenUniform(const TType& type) const ...@@ -737,8 +737,7 @@ bool HlslParseContext::shouldFlattenUniform(const TType& type) const
return type.isArray() && return type.isArray() &&
intermediate.getFlattenUniformArrays() && intermediate.getFlattenUniformArrays() &&
qualifier == EvqUniform && qualifier == EvqUniform &&
// Testing the EbtSampler basic type covers samplers and textures type.isOpaque();
type.getBasicType() == EbtSampler;
} }
void HlslParseContext::flatten(const TSourceLoc& loc, const TVariable& variable) void HlslParseContext::flatten(const TSourceLoc& loc, const TVariable& variable)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment