From: John Kessenich Date: Mon, 12 May 2014 18:12:04 +0000 (+0000) Subject: Non-functional tweak to hidden-member (of anonymous block) semantics. X-Git-Tag: upstream/0.1~690 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad47ee8909856f53e7787a8082afe5c26659b874;p=platform%2Fupstream%2Fglslang.git Non-functional tweak to hidden-member (of anonymous block) semantics. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26610 e7fa87d3-cd2b-0410-9028-fcbf551c1848 --- diff --git a/Todo.txt b/Todo.txt index db4d4a3..6549c97 100644 --- 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., “(2,3)” is not allowed, semantically, + + Clarified that a comma sequence-operator expression cannot be a constant expression. E.g., “(2,3)” 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. diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h index e4c84dc..4f0c923 100644 --- a/glslang/Include/Types.h +++ b/glslang/Include/Types.h @@ -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()); diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index c0fe197..c77ef85 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -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; } }