[Mesa-dev] [PATCH] glsl: Defer initialization of built-in functions until they're needed.
eric at anholt.net
Thu Sep 22 14:32:41 PDT 2011
On Thu, 22 Sep 2011 12:41:21 -0700, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Very simple shaders don't actually use GLSL built-ins. For example:
> - gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
> - gl_FragColor = vec4(0.0);
> Both of the shaders used by _mesa_meta_glsl_Clear() also qualify.
> By waiting to initialize the built-ins until the first time we need to
> look for a signature, we can avoid the overhead entirely in these cases.
> Makes piglit run roughly 18% faster (255 vs. 312 seconds).
Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the mesa-dev