glsl: Compile error if fs defines conflicting qualifiers for gl_FragCoord

GLSL 1.50 spec says:
   "If gl_FragCoord is redeclared in any fragment shader in a program,
    it must be redeclared in all the fragment shaders in that
    program that have a static use gl_FragCoord. All redeclarations of
    gl_FragCoord in all fragment shaders in a single program must
    have the same set of qualifiers."

This patch makes the glsl compiler to generate an error if we have a
fragment shader defined with conflicting layout qualifier declarations
for gl_FragCoord. For example:

layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;
layout(pixel_center_integer) in vec4 gl_FragCoord;
void main()
{
   gl_FragColor = gl_FragCoord.xyzz;
}

Added piglit tests to verify the implementation.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
glsl: Refactor the code in set_shader_inout_layout()

This patch makes only non-functional changes to the code.
Refactoring done here would help my next patch to add 'layout'
setting code for gl_FragCoord in fragment shader.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
glsl: Link error if fs define conflicting qualifiers for gl_FragCoord

GLSL 1.50 spec says:
   "If gl_FragCoord is redeclared in any fragment shader in a program,
    it must be redeclared in all the fragment shaders in that
    program that have a static use gl_FragCoord. All redeclarations of
    gl_FragCoord in all fragment shaders in a single program must
    have the same set of qualifiers."

This patch causes the shader link to fail if we have multiple fragment
shaders with conflicting layout qualifiers for gl_FragCoord.
For example:

fragment shader 1:
layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;

void foo();
void main()
{
   gl_FragColor = vec4(gl_FragCoord.xyz, 1.0);
   foo();
}

fragment shader 2:
layout(origin_upper_left) in vec4 gl_FragCoord;
void foo()
{
   gl_FragColor.a = gl_FragCoord.z;
}

Added piglit tests to verify the implementation.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>

Fix the implementation to follow "static use gl_FragCoord" text
quoted above.
glsl: Fix link error conditions of gl_FragCoord layout qualifiers