Fix bug where bracket dereferences were incorrectly keeping the base's qualifier (for example constBase[i] would still be a const instead of EvqTemporary).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23722 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
ea869fb403
commit
e17ef84753
31 changed files with 185 additions and 89 deletions
|
|
@ -492,6 +492,8 @@ TIntermTyped* TParseContext::handleBracketDereference(TSourceLoc loc, TIntermTyp
|
|||
newType.shallowCopy(base->getType());
|
||||
if (base->getType().getQualifier().storage == EvqConst && index->getQualifier().storage == EvqConst)
|
||||
newType.getQualifier().storage = EvqConst;
|
||||
else
|
||||
newType.getQualifier().storage = EvqTemporary;
|
||||
newType.dereference();
|
||||
result->setType(newType);
|
||||
|
||||
|
|
@ -3383,8 +3385,10 @@ TIntermNode* TParseContext::addSwitch(TSourceLoc loc, TIntermTyped* expression,
|
|||
return switchNode;
|
||||
}
|
||||
|
||||
// TODO: constant folding: these should use a follow a fully folded model now, and probably move to Constant.cpp scheme.
|
||||
|
||||
//
|
||||
// This function returns the tree representation for the vector field(s) being accessed from contant vector.
|
||||
// This function returns the tree representation for the vector field(s) being accessed from a constant vector.
|
||||
// If only one component of vector is accessed (v.x or v[0] where v is a contant vector), then a contant node is
|
||||
// returned, else an aggregate node is returned (for v.xy). The input to this function could either be the symbol
|
||||
// node or it could be the intermediate tree representation of accessing fields in a constant structure or column of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue