Re: [Mesa-dev] [PATCH] mesa: Free the compiled shader IR after it has been linked.

2014-05-31 Thread Eric Anholt
Ian Romanick i...@freedesktop.org writes: On 05/28/2014 01:57 PM, Eric Anholt wrote: If the shader compiled once, then we can compile it again. Compiled shaders almost always get used in just one program, so holding that compiled IR until the program is freed is just a waste of memory.

Re: [Mesa-dev] [PATCH] mesa: Free the compiled shader IR after it has been linked.

2014-05-31 Thread Ian Romanick
On 05/31/2014 02:39 PM, Eric Anholt wrote: Ian Romanick i...@freedesktop.org writes: On 05/28/2014 01:57 PM, Eric Anholt wrote: If the shader compiled once, then we can compile it again. Compiled shaders almost always get used in just one program, so holding that compiled IR until the

Re: [Mesa-dev] [PATCH] mesa: Free the compiled shader IR after it has been linked.

2014-05-31 Thread Ian Romanick
On 05/28/2014 01:57 PM, Eric Anholt wrote: If the shader compiled once, then we can compile it again. Compiled shaders almost always get used in just one program, so holding that compiled IR until the program is freed is just a waste of memory. On the other hand, if they are either reusing

Re: [Mesa-dev] [PATCH] mesa: Free the compiled shader IR after it has been linked.

2014-05-30 Thread Ian Romanick
On 05/28/2014 01:57 PM, Eric Anholt wrote: If the shader compiled once, then we can compile it again. Compiled shaders almost always get used in just one program, so holding that compiled IR until the program is freed is just a waste of memory. Would this work with some madness like:

[Mesa-dev] [PATCH] mesa: Free the compiled shader IR after it has been linked.

2014-05-28 Thread Eric Anholt
If the shader compiled once, then we can compile it again. Compiled shaders almost always get used in just one program, so holding that compiled IR until the program is freed is just a waste of memory. On the other hand, if they are either reusing shader objects to compile multiple times, or