Non-functional tweak to hidden-member (of anonymous block) semantics.
authorJohn Kessenich <cepheus@frii.com>
Mon, 12 May 2014 18:12:04 +0000 (18:12 +0000)
committerJohn Kessenich <cepheus@frii.com>
Mon, 12 May 2014 18:12:04 +0000 (18:12 +0000)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26610 e7fa87d3-cd2b-0410-9028-fcbf551c1848

Todo.txt
glslang/Include/Types.h
glslang/MachineIndependent/ParseHelper.cpp

index db4d4a3..6549c97 100644 (file)
--- a/Todo.txt
+++ b/Todo.txt
@@ -188,7 +188,7 @@ Shader Functionality to Implement/Finish
       + Clarify that .length() returns an int type and can be used as a constant integer expression.
       + Allow swizzle operations on scalars.
       + Positive signed decimal literals, as well as octal and hexadecimal, can set all 32 bits. This includes setting the sign bit to create a negative value.
-      - Clarified that a comma sequence-operator expression cannot be a constant expression. E.g., \93(2,3)\94 is not allowed, semantically, 
+      + Clarified that a comma sequence-operator expression cannot be a constant expression. E.g., \93(2,3)\94 is not allowed, semantically, 
             as a valid constant expression 3, even though it is an expression that will evaluate to 3.
       + Use vec2 instead of vec3 for coordinate in textureGather*(sampler2DRect,...).
       + Clarify that textureGatherOffset() can take non-constants for the offsets.
index e4c84dc..4f0c923 100644 (file)
@@ -833,8 +833,8 @@ public:
             vectorSize = 1;
     }
 
-    virtual void hideType() { basicType = EbtVoid; vectorSize = 1; }
-    virtual bool wasTypeHidden() const { return basicType == EbtVoid; }
+    virtual void hideMember() { basicType = EbtVoid; vectorSize = 1; }
+    virtual bool hiddenMember() const { return basicType == EbtVoid; }
 
     virtual void setTypeName(const TString& n) { typeName = NewPoolTString(n.c_str()); }
     virtual void setFieldName(const TString& n) { fieldName = NewPoolTString(n.c_str()); }
@@ -1062,7 +1062,7 @@ public:
         if (structure) {
             s.append("{");
             for (size_t i = 0; i < structure->size(); ++i) {
-                if ((*structure)[i].type->getBasicType() != EbtVoid) {
+                if (! (*structure)[i].type->hiddenMember()) {
                     s.append((*structure)[i].type->getCompleteString());
                     s.append(" ");
                     s.append((*structure)[i].type->getFieldName());
index c0fe197..c77ef85 100644 (file)
@@ -397,7 +397,7 @@ TIntermTyped* TParseContext::handleVariable(TSourceLoc loc, TSymbol* symbol, TSt
         node = intermediate.addIndex(EOpIndexDirectStruct, container, constNode, loc);
 
         node->setType(*(*variable->getType().getStruct())[anon->getMemberNumber()].type);
-        if (node->getType().wasTypeHidden())
+        if (node->getType().hiddenMember())
             error(loc, "member of nameless block was not redeclared", string->c_str(), "");
     } else {
         // Not a member of an anonymous container.
@@ -2574,7 +2574,7 @@ void TParseContext::redeclareBuiltinBlock(TSourceLoc loc, TTypeList& newTypeList
             if (instanceName)
                 member = type.getWritableStruct()->erase(member);
             else {
-                member->type->hideType();
+                member->type->hideMember();
                 ++member;
             }
         }