]> git.tdb.fi Git - libs/gl.git/commit
Ensure that program syntax nodes get deep-copied properly
authorMikko Rasa <tdb@tdb.fi>
Fri, 2 Dec 2016 20:17:50 +0000 (22:17 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 2 Dec 2016 20:17:50 +0000 (22:17 +0200)
commit79c49c6b6155857ed0ebe85eb07a996788a6190b
tree0e603444d23a8603d32b3b82162ecc86511225f8
parenta48aaa402e2aacab780805f529cde4ded7ae3f59
Ensure that program syntax nodes get deep-copied properly

The changes in 57c1139 prevented copies happening even when they should,
so the shared section got inserted into shader stages by reference.  This
caused some funny business with the variable resolver and unused variable
locator.

Containers of nodes must have RefPtrs inside them, since insertions will
create some temporary copies of the element and with NodePtr that would
trigger copying the node as well.  So the cloning of nodes is performed
when the container itself is copied.
source/programsyntax.cpp
source/programsyntax.h