[Mesa-dev] [Bug 87407] glReadPixels not working when the RGBA component is of the type dFdy(abs())

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Dec 17 03:22:32 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=87407

            Bug ID: 87407
           Summary: glReadPixels not working when the RGBA component is of
                    the type dFdy(abs())
           Product: Mesa
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: agomez at igalia.com

Created attachment 110945
  --> https://bugs.freedesktop.org/attachment.cgi?id=110945&action=edit
Patch to correct the GCC warnings and introduce the 2 latest use cases

At bug 82991 we extended the piglit test glsl-deriv-varyings with 3 new cases:
http://lists.freedesktop.org/archives/piglit/2014-December/013648.html

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:
http://lists.freedesktop.org/archives/piglit/2014-December/013764.html

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


More information about the mesa-dev mailing list