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
This commit is contained in:
parent
bae44b74d4
commit
ad47ee8909
2
Todo.txt
2
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.
|
||||
|
@ -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());
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user