<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Linking GLSL 1.30 shaders with invariant and deprecated variables triggers an 'mismatching invariant qualifiers' error"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=100316#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Linking GLSL 1.30 shaders with invariant and deprecated variables triggers an 'mismatching invariant qualifiers' error"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=100316">bug 100316</a>
              from <span class="vcard"><a class="email" href="mailto:metalcaedes@gmail.com" title="Daniel Gibson <metalcaedes@gmail.com>"> <span class="fn">Daniel Gibson</span></a>
</span></b>
        <pre>I ran into the same bug, on Ubuntu 17.04 with both Mesa 17.0.7-0ubuntu0.17.04.1
and 17.2.2+git20171019+17.2.23c08dab-0ubuntu0ricotz~17.04.1 (from the
xorg-edgers ppa).
I have observed this bug both with Intel (Iris Pro 5200) and AMD (Radeon R7
370) GPUs.

It doesn't only happen with deprecated variables, but also when using a OpenGL
core (3.2) context and corresponding shaders, by adding "invariant
gl_Position;" to a vertex shader (doesn't seem to affect all vertex shaders,
though).

It can be reproduced with this branch of Yamagi Quake2:
<a href="https://github.com/DanielGibson/yquake2/tree/mesa-100316">https://github.com/DanielGibson/yquake2/tree/mesa-100316</a> (start with ./quake2
+set vid_renderer gl3)

The corresponding source is:
<a href="https://github.com/DanielGibson/yquake2/blob/mesa-100316/src/client/refresh/gl3/gl3_shaders.c#L328-L329">https://github.com/DanielGibson/yquake2/blob/mesa-100316/src/client/refresh/gl3/gl3_shaders.c#L328-L329</a>
(<a href="https://github.com/DanielGibson/yquake2/blob/mesa-100316/src/client/refresh/gl3/gl3_shaders.c#L261-L288">https://github.com/DanielGibson/yquake2/blob/mesa-100316/src/client/refresh/gl3/gl3_shaders.c#L261-L288</a>
is also part of the shader)

When adding "invariant gl_Position;" into my simpler vertexSrc2D shader
(<a href="https://github.com/DanielGibson/yquake2/blob/mesa-100316/src/client/refresh/gl3/gl3_shaders.c#L166">https://github.com/DanielGibson/yquake2/blob/mesa-100316/src/client/refresh/gl3/gl3_shaders.c#L166</a>),
it does not create an error there.

As Olivier wrote, compiling the shader gives no errors, but linking the vertex-
and fragment-shaders into a program fails.
The error message doesn't even mention gl_Position directly, but some other
variable (in my case "error: declarations for uniform `transModel' have
mismatching invariant qualifiers") - but when commenting the "invariant
gl_Position;" line out, it works.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>