[Mesa-dev] [Bug 100316] Linking GLSL 1.30 shaders with invariant and deprecated variables triggers an 'mismatching invariant qualifiers' error

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Oct 28 23:01:58 UTC 2017


--- Comment #1 from Daniel Gibson <metalcaedes at gmail.com> ---
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,

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

The corresponding source is:
is also part of the shader)

When adding "invariant gl_Position;" into my simpler vertexSrc2D shader
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.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171028/5e21866e/attachment.html>

More information about the mesa-dev mailing list