On Wed, 4 Aug 2010 16:51:22 +0200, Aras Pranckevicius <a...@unity3d.com> wrote: > Hi, > > Attached patch - or alternatively, this github commit: > http://github.com/aras-p/glsl-optimizer/commit/cb5b9ad7b439eddaedc54147f41727a661d11b21 > - > fixes GLSL2 performance problems after many shaders are processed. > > When constructing builtin functions, they are put into global memory pool > (once), and their prototypes cloned into current shader. However, the cloned > prototype variables were still using the global memory pool, which then > makes talloc_parent's O(N) complexity really visible after a while.
We were talking about this this morning, and I ended up doing a more complete fix -- most places we clone we want to be cloning into a particular place, so just pass a mem_ctx in to ->clone(). Looks like it's fixed the performance problem here.
pgpmBdMgeUpRb.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev