[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
Wed Mar 22 11:16:35 UTC 2017
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 at lists.freedesktop.org
Reporter: o.lauffenburger at topsolid.com
QA Contact: intel-3d-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170322/d1a96570/attachment.html>
More information about the mesa-dev
mailing list