Re: [Mesa-dev] [PATCH 2/2] linker: Eliminate more dead code after demoting shader inputs and outputs

2011-10-23 Thread Yuanhan Liu
On Fri, Oct 21, 2011 at 11:49:44AM -0700, Ian Romanick wrote: > From: Ian Romanick > > Consider the following vertex shader and fragment shader: > > // vertex shader > varying vec4 v; > uniform vec4 u; > > void main() { gl_Position = vec4(0.0); v = u; } > > // fragment shader > void main() { g

Re: [Mesa-dev] [PATCH 2/2] linker: Eliminate more dead code after demoting shader inputs and outputs

2011-10-21 Thread Kenneth Graunke
On 10/21/2011 11:49 AM, Ian Romanick wrote: > From: Ian Romanick > > Consider the following vertex shader and fragment shader: > > // vertex shader > varying vec4 v; > uniform vec4 u; > > void main() { gl_Position = vec4(0.0); v = u; } > > // fragment shader > void main() { gl_FragColor = vec4

[Mesa-dev] [PATCH 2/2] linker: Eliminate more dead code after demoting shader inputs and outputs

2011-10-21 Thread Ian Romanick
From: Ian Romanick Consider the following vertex shader and fragment shader: // vertex shader varying vec4 v; uniform vec4 u; void main() { gl_Position = vec4(0.0); v = u; } // fragment shader void main() { gl_FragColor = vec4(0.0); } Since the fragment shader does not use 'v', it is demoted