aboutsummaryrefslogtreecommitdiff
path: root/glslang/MachineIndependent/parseConst.cpp
diff options
context:
space:
mode:
authorJohn Kessenich <cepheus@frii.com>2013-01-24 23:10:51 +0000
committerJohn Kessenich <cepheus@frii.com>2013-01-24 23:10:51 +0000
commit5521862729111aee7a86dddee9abc99a50534164 (patch)
tree5a9659d5bed55866f71947d82d68469d6eb94af9 /glslang/MachineIndependent/parseConst.cpp
parent674014bfc4a4ee12de25b26eb2b0206be65bd8c2 (diff)
downloadglslang-5521862729111aee7a86dddee9abc99a50534164.tar.gz
Implement the full scheme for ES precision qualifiers, generalizing existing storage qualifiers to be able to include multiple independent kinds of qualifiers.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20317 e7fa87d3-cd2b-0410-9028-fcbf551c1848
Diffstat (limited to 'glslang/MachineIndependent/parseConst.cpp')
-rw-r--r--glslang/MachineIndependent/parseConst.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/glslang/MachineIndependent/parseConst.cpp b/glslang/MachineIndependent/parseConst.cpp
index 3497d8cd..25e721f1 100644
--- a/glslang/MachineIndependent/parseConst.cpp
+++ b/glslang/MachineIndependent/parseConst.cpp
@@ -69,15 +69,15 @@ void ParseSymbol(TIntermSymbol* node, TIntermTraverser* it)
{
TConstTraverser* oit = static_cast<TConstTraverser*>(it);
oit->infoSink.info.message(EPrefixInternalError, "Symbol Node found in constant constructor", node->getLine());
- return;
+ return;
}
bool ParseBinary(bool /* preVisit */, TIntermBinary* node, TIntermTraverser* it)
{
TConstTraverser* oit = static_cast<TConstTraverser*>(it);
- TQualifier qualifier = node->getType().getQualifier();
+ TStorageQualifier qualifier = node->getType().getQualifier().storage;
if (qualifier != EvqConst) {
const int maxSize = 200;
@@ -85,6 +85,7 @@ bool ParseBinary(bool /* preVisit */, TIntermBinary* node, TIntermTraverser* it)
sprintf_s(buf, maxSize, "'constructor' : assigning non-constant to %s", oit->type.getCompleteString().c_str());
oit->infoSink.info.message(EPrefixError, buf, node->getLine());
oit->error = true;
+
return false;
}
@@ -102,6 +103,7 @@ bool ParseUnary(bool /* preVisit */, TIntermUnary* node, TIntermTraverser* it)
sprintf_s(buf, maxSize, "'constructor' : assigning non-constant to '%s'", oit->type.getCompleteString().c_str());
oit->infoSink.info.message(EPrefixError, buf, node->getLine());
oit->error = true;
+
return false;
}
@@ -115,11 +117,13 @@ bool ParseAggregate(bool /* preVisit */, TIntermAggregate* node, TIntermTraverse
sprintf_s(buf, maxSize, "'constructor' : assigning non-constant to '%s'", oit->type.getCompleteString().c_str());
oit->infoSink.info.message(EPrefixError, buf, node->getLine());
oit->error = true;
+
return false;
}
if (node->getSequence().size() == 0) {
oit->error = true;
+
return false;
}
@@ -152,6 +156,7 @@ bool ParseAggregate(bool /* preVisit */, TIntermAggregate* node, TIntermTraverse
oit->isMatrix = false;
oit->matrixSize = 0;
}
+
return false;
}
@@ -229,6 +234,7 @@ bool ParseLoop(bool /* preVisit */, TIntermLoop* node, TIntermTraverser* it)
TConstTraverser* oit = static_cast<TConstTraverser*>(it);
oit->infoSink.info.message(EPrefixInternalError, "Loop Node found in constant constructor", node->getLine());
oit->error = true;
+
return false;
}
@@ -237,6 +243,7 @@ bool ParseBranch(bool /* previsit*/, TIntermBranch* node, TIntermTraverser* it)
TConstTraverser* oit = static_cast<TConstTraverser*>(it);
oit->infoSink.info.message(EPrefixInternalError, "Branch Node found in constant constructor", node->getLine());
oit->error = true;
+
return false;
}