Fix bug where an anonymous member of a built-in block containing another member with an implicitly-sized array caused two copies of the block to be referenced.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26633 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
9854f21010
commit
6e62d92cfb
6 changed files with 31 additions and 21 deletions
|
|
@ -381,7 +381,11 @@ TIntermTyped* TParseContext::handleVariable(TSourceLoc loc, TSymbol* symbol, TSt
|
|||
// on first use, so that all future references will share its array structure,
|
||||
// so that editing the implicit size will effect all nodes consuming it,
|
||||
// and so that editing the implicit size won't change the shared one.
|
||||
if (symbol->getType().containsImplicitlySizedArray())
|
||||
//
|
||||
// If this is a variable or a block, check it and all it contains, but if this
|
||||
// is a member of an anonymous block, check the whole block, as the whole block
|
||||
// will need to be copied up if it contains an implicitly-sized array.
|
||||
if (symbol->getType().containsImplicitlySizedArray() || (symbol->getAsAnonMember() && symbol->getAsAnonMember()->getAnonContainer().getType().containsImplicitlySizedArray()))
|
||||
makeEditable(symbol);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue