<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><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">100316</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Linking GLSL 1.30 shaders with invariant and deprecated variables triggers an 'mismatching invariant qualifiers' error
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>17.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>glsl-compiler
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>o.lauffenburger@topsolid.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>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.</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>