https://bugs.freedesktop.org/show_bug.cgi?id=100316

            Bug ID: 100316
           Summary: Linking GLSL 1.30 shaders with invariant and
                    deprecated variables triggers an 'mismatching
                    invariant qualifiers' error
           Product: Mesa
           Version: 17.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: glsl-compiler
          Assignee: mesa-dev@lists.freedesktop.org
          Reporter: o.lauffenbur...@topsolid.com
        QA Contact: intel-3d-b...@lists.freedesktop.org

I have the following GLSL 1.30 vertex and pixel shaders:

* Vertex shader:

#version 130

flat out vec4 triangleColor;

invariant gl_Position;

void main()
{
        gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
        gl_ClipVertex = gl_ModelViewMatrix * gl_Vertex;

        triangleColor = vec4(1.0, 1.0, 0.0, 1.0);
}

* Fragment shader:

#version 130

precision highp float;

flat in vec4 triangleColor;

void main()
{
        gl_FragColor = gl_Color * triangleColor;
}

Compilation is OK but linking fails with error:

error: declarations for uniform `gl_ModelViewProjectionMatrix' have mismatching
invariant qualifiers

Slightly different vertex shaders can produce the error:

error: declarations for shader input `gl_Vertex' have mismatching invariant
qualifiers

There is no linking error anymore when I remove the "invariant gl_Position;"
declaration.

Given that gl_Vertex and gl_ModelViewProjectionMatrix are not output variables
for vertex shaders, I suppose that this behavior is not expected.

This error occurs with Mesa 17.0.2.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to