[Mesa-dev] [PATCH] glsl2: performance regression with import_prototypes
eric at anholt.net
Wed Aug 4 14:48:50 PDT 2010
On Wed, 4 Aug 2010 16:51:22 +0200, Aras Pranckevicius <aras at unity3d.com> wrote:
> Attached patch - or alternatively, this github commit:
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the mesa-dev