Re: [Mesa-dev] [PATCH V2 2/4] glsl: Compile error if fs uses gl_FragCoord before first redeclaration

2014-02-25 Thread Ian Romanick
On 02/24/2014 05:34 PM, Anuj Phogat wrote: Section 4.3.8.1, page 39 of GLSL 1.50 spec says: Within any shader, the first redeclarations of gl_FragCoord must appear before any use of gl_FragCoord. GLSL compiler should generate an error in following case: vec4 p = gl_FragCoord;

Re: [Mesa-dev] [PATCH V2 2/4] glsl: Compile error if fs uses gl_FragCoord before first redeclaration

2014-02-25 Thread Anuj Phogat
On Tue, Feb 25, 2014 at 7:47 AM, Ian Romanick i...@freedesktop.org wrote: On 02/24/2014 05:34 PM, Anuj Phogat wrote: Section 4.3.8.1, page 39 of GLSL 1.50 spec says: Within any shader, the first redeclarations of gl_FragCoord must appear before any use of gl_FragCoord. GLSL compiler

Re: [Mesa-dev] [PATCH V2 2/4] glsl: Compile error if fs uses gl_FragCoord before first redeclaration

2014-02-25 Thread Ian Romanick
On 02/25/2014 01:15 PM, Anuj Phogat wrote: On Tue, Feb 25, 2014 at 7:47 AM, Ian Romanick i...@freedesktop.org wrote: On 02/24/2014 05:34 PM, Anuj Phogat wrote: Section 4.3.8.1, page 39 of GLSL 1.50 spec says: Within any shader, the first redeclarations of gl_FragCoord must appear

[Mesa-dev] [PATCH V2 2/4] glsl: Compile error if fs uses gl_FragCoord before first redeclaration

2014-02-24 Thread Anuj Phogat
Section 4.3.8.1, page 39 of GLSL 1.50 spec says: Within any shader, the first redeclarations of gl_FragCoord must appear before any use of gl_FragCoord. GLSL compiler should generate an error in following case: vec4 p = gl_FragCoord; layout(origin_upper_left) in vec4 gl_FragCoord; void