[Bug 101378] interpolateAtSample check for input parameter is too strict
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Jun 11 09:38:59 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=101378
Bug ID: 101378
Summary: interpolateAtSample check for input parameter is too
strict
Product: Mesa
Version: 17.0
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: glsl-compiler
Assignee: mesa-dev at lists.freedesktop.org
Reporter: freedesktop at ca.sh13.net
QA Contact: intel-3d-bugs at lists.freedesktop.org
The following code snippet fails on Mesa 17.0.3 with the following error:
in GeometryToPixel
{
vec3 color;
vec2 uv;
} gs2ps;
out vec4 Color;
void main ()
{
Color = vec4(gs2ps.color, 1);
if (length(interpolateAtSample(gs2ps.uv, gl_SampleID))>1) {
discard;
}
}
This is the error:
0:10(1): error: if a fragment input is (or contains) an integer, then it
must be qualified with 'flat'
0:10(8): error: `gl_SampleID' redeclared
0:18(33): error: parameter `interpolant` must be a shader input
0:18(6): error: no matching function for call to `length(error)';
candidates are:
0:18(6): error: float length(float)
0:18(6): error: float length(vec2)
0:18(6): error: float length(vec3)
0:18(6): error: float length(vec4)
0:18(6): error: double length(double)
0:18(6): error: double length(dvec2)
0:18(6): error: double length(dvec3)
0:18(6): error: double length(dvec4)
0:18(6): error: operands to relational operators must be scalar and numeric
0:18(6): error: if-statement condition must be scalar boolean
Changing the shader to use:
in vec3 icolor;
in vec2 iuv;
fixes the problem. This seems to be related to
https://patchwork.freedesktop.org/patch/15298/, but the input variable check is
too strict. It should work with an input block as well, which is for instance
used by the G-Truc samples:
https://github.com/g-truc/ogl-samples/blob/655559499c23b9566ac432cc2af33cde6646271c/data/gl-400/fbo-multisample-interpolate.frag
Code in question works fine on AMD desktop drivers.
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20170611/7d2086bb/attachment.html>
More information about the intel-3d-bugs
mailing list