<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 - glReadPixels not working when the RGBA component is of the type dFdy(abs())"
href="https://bugs.freedesktop.org/show_bug.cgi?id=87407">87407</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>glReadPixels not working when the RGBA component is of the type dFdy(abs())
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</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>Mesa core
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>agomez@igalia.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=110945" name="attach_110945" title="Patch to correct the GCC warnings and introduce the 2 latest use cases">attachment 110945</a> <a href="attachment.cgi?id=110945&action=edit" title="Patch to correct the GCC warnings and introduce the 2 latest use cases">[details]</a></span>
Patch to correct the GCC warnings and introduce the 2 latest use cases
At <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - Inverted bumpmap in webgl applications"
href="show_bug.cgi?id=82991">bug 82991</a> we extended the piglit test glsl-deriv-varyings with 3 new cases:
<a href="http://lists.freedesktop.org/archives/piglit/2014-December/013648.html">http://lists.freedesktop.org/archives/piglit/2014-December/013648.html</a>
However, a couple of GCC warnings were introduced in piglit and the last 2
extended cases using dFdx(abs()) and dFdy(abs()) were not being tested.
After fixing the warnings (see attached patch) and getting the 2 last cases to
work, a new bug has been identified in mesa.
For example, in this piglit test, using the following fragment shader:
uniform sampler2D tex2d;
varying vec2 texCoords;
void main()
{
gl_FragColor = vec4(dFdx(abs(texCoords.x)) * 40.0,
dFdy(abs(texCoords.y)) * 40.0,
0.0, 1.0);
}
The piglit result is:
Probe color at
Expected: 0.800000 0.400000 0.000000
Observed: 0.800000 0.000000 0.000000
PIGLIT: {"result": "fail" }
However, running manually the test with:
$ PIGLIT_SOURCE_DIR="<path_to>/piglit.git" PIGLIT_PLATFORM="mixed_glx_egl"
<path_to>/piglit.git/bin/glsl-deriv-varyings
We can see that the pixels painted in the display are, actually, the expected
ones.
Hence, the problem happens when checking the colors of the pixels through
glReadPixels.
I've also checked that the problem is reproducible, at least, with swrast, i965
(gen6) and nouveau.
While I'm investigating this problem, I've sent a patch proposal to remove
these test cases and fix also the introduced warnings at:
<a href="http://lists.freedesktop.org/archives/piglit/2014-December/013764.html">http://lists.freedesktop.org/archives/piglit/2014-December/013764.html</a></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>