added semantic handling and support for remapping variables with semantics

Change-Id: I3c6b5fc1d4f1da6ec6f436fea72849453a13559d
This commit is contained in:
t.jung 2017-01-04 17:55:31 +01:00 committed by Tiemo Jung
parent 7225a1cb1e
commit 8bb3ee53c5
5 changed files with 183 additions and 36 deletions

View file

@ -392,6 +392,7 @@ public:
void clear()
{
semanticName = nullptr;
precision = EpqNone;
invariant = false;
noContraction = false;
@ -401,6 +402,7 @@ public:
// drop qualifiers that don't belong in a temporary variable
void makeTemporary()
{
semanticName = nullptr;
storage = EvqTemporary;
builtIn = EbvNone;
clearInterstage();
@ -445,10 +447,17 @@ public:
// If A, then nothing should change, if B, then everything should change, but this is half way.
void makePartialTemporary()
{
semanticName = nullptr;
storage = EvqTemporary;
specConstant = false;
}
bool hasSemantic() const
{
return semanticName != nullptr;
}
const char* semanticName;
TStorageQualifier storage : 6;
TBuiltInVariable builtIn : 8;
TPrecisionQualifier precision : 3;