[Mesa-dev] [RFC][PATCH] gallium: Delay the creation of simple helper shaders

Brian Paul brian.e.paul at gmail.com
Sat Mar 5 10:30:41 PST 2011


On Sat, Mar 5, 2011 at 8:23 AM, Jakob Bornecrantz <wallbraker at gmail.com> wrote:
> The utility code and in some parts st/mesa creates a bunch of shaders on app
> start that are never really used. This gives a very high noise to signal
> ratio when trying to debug shaders in simple debug applications.
>
> Looking at trivial/tri with rbug shows us 12 shaders, after this patch only 3*.
>
> This patch could probably be taken a step futher and all these simple shaders
> could be collected in a util_simple_shader_pool struct so they could be shared
> between the different util code.
>
> Comments and reviews please?

Looks good.  Please test with a bunch of piglit tests, of course.

BTW, If there isn't already a PIPE_TEXTURE_x to TGSI_TEXTURE_x
translation utility function, there probably should be.


> Cheers Jakob.
>
> *The mesa state tracker seems to be for trivial/tri be creating a duplicate
> vertex shader. While for glxgears it creates one vertex shader with 6 inputs.

I've noticed that too with other tests.  Haven't had time to investigate though.

-Brina


More information about the mesa-dev mailing list