System Environment: -------------------------- Arch: i386 Platform: Pineview Libdrm: (master)2.4.24-9-g5cb554a0d6e986f2d7300a91d95983fa09b17f65 Mesa: (master)5eb9f687087a4bc71775a32efcd848fc6cd67694 Xserver:(master)xorg-server-1.10.0-143-g327e1d88012102af6aca6c6840aa0ed3c7041a77 Xf86_video_intel:(master)2.14.902-2-g630d77bf10ba6234bb9c04538636f7d8aa319aea Kernel: (drm-intel-next)f0c860246472248a534656d6cdbed5a36d1feb2e Bug detailed description: ------------------------- This is regression. There are other three cases failed due to the same cause: pxstore-read, pxtrans-read, pbo subcase texImage.1PBOChangeInternalFormat. Bisect shows e5c6a92a12b5cd7db205d72039f58d302b0be9d5 is the first bad commit. commit e5c6a92a12b5cd7db205d72039f58d302b0be9d5 Author: Marek Olšák <maraeo@gmail.com> AuthorDate: Tue Feb 15 23:30:23 2011 +0100 Commit: Marek Olšák <maraeo@gmail.com> CommitDate: Tue Mar 29 12:04:55 2011 +0200 mesa: implement clamping controls (ARB_color_buffer_float) Squashed commit of the following: Author: Marek Olšák <maraeo@gmail.com> mesa: fix getteximage so that it doesn't clamp values mesa: update the compute_version function mesa: add display list support for ARB_color_buffer_float mesa: fix glGet query with GL_ALPHA_TEST_REF and ARB_color_buffer_float
Each of these tests has many, many subtests. Do we have any idea what specifically is failing?
I've also noticed that glean's readPixSanity fails on master but passes on 7.10. Do you know if that bisects to the same commit?
glean's readPixSanity failure is not the bisect commit caused. Following is oglc pxconv-read subtest error info: PixelConvertCompareRead ERROR: Test failed with format PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE and type GL_HALF_FLOAT_ARB, generated color (1.000, 0.341, 0.925, 0.949). Read back {2.266}. Expected {1.000}. PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE and type GL_BYTE, generated color (1.000, 0.341, 0.925, 0.949). Read back {0.255}. Expected {1.000}. PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE and type GL_UNSIGNED_BYTE, generated color (1.000, 0.341, 0.925, 0.949). Read back {0.255}. Expected {1.000}. PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE and type GL_SHORT, generated color (1.000, 0.341, 0.925, 0.949). Read back {0.267}. Expected {1.000}. PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE and type GL_INT, generated color (1.000, 0.341, 0.925, 0.949). Read back {-1.000}. Expected {1.000}. PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE and type GL_UNSIGNED_INT, generated color (1.000, 0.341, 0.925, 0.949). Read back {0.267}. Expected {1.000}. PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE_ALPHA and type GL_HALF_FLOAT_ARB, generated color (1.000, 0.341, 0.925, 0.949). Read back {2.266, 0.949}. Expected {1.000, 0.949}. PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE_ALPHA and type GL_BYTE, generated color (1.000, 0.341, 0.925, 0.949). Read back {0.255, 0.945}. Expected {1.000, 0.949}. PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE_ALPHA and type GL_UNSIGNED_BYTE, generated color (1.000, 0.341, 0.925, 0.949). Read back {0.255, 0.949}. Expected {1.000, 0.949}. PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE_ALPHA and type GL_SHORT, generated color (1.000, 0.341, 0.925, 0.949). Read back {0.267, 0.949}. Expected {1.000, 0.949}. PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE_ALPHA and type GL_INT, generated color (1.000, 0.341, 0.925, 0.949). Read back {-1.000, 0.949}. Expected {1.000, 0.949}. PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE_ALPHA and type GL_UNSIGNED_INT, generated color (1.000, 0.341, 0.925, 0.949). Read back {0.267, 0.949}. Expected {1.000, 0.949}.
(In reply to comment #3) > glean's readPixSanity failure is not the bisect commit caused. > > Following is oglc pxconv-read subtest error info: > PixelConvertCompareRead ERROR: Test failed with format PixelConvertCompareRead > ERROR: Test failed with format GL_LUMINANCE and type GL_HALF_FLOAT_ARB, > generated color (1.000, 0.341, 0.925, 0.949). > Read back {2.266}. Expected {1.000}. > PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE and type > GL_BYTE, generated color (1.000, 0.341, 0.925, 0.949). > Read back {0.255}. Expected {1.000}. For glReadPixels, the RGB-to-luminance conversion is (see page 225 of the OpenGL 2.1 spec): L=R+G+B If the source color is (1.000, 0.341, 0.925, 0.949), that's (0x7f, 0x2b, 0x75, 0x78) as signed bytes. Without clamping, 0x7f + 0x2b + 0x75 = 0x11f. Masking that to a signed byte gives 0x1f, and converting that to float gives 0.244. It looks like the post-conversion clamp isn't happening. > PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE and type > GL_UNSIGNED_BYTE, generated color (1.000, 0.341, 0.925, 0.949). > Read back {0.255}. Expected {1.000}. > PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE and type > GL_SHORT, generated color (1.000, 0.341, 0.925, 0.949). > Read back {0.267}. Expected {1.000}. > PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE and type > GL_INT, generated color (1.000, 0.341, 0.925, 0.949). > Read back {-1.000}. Expected {1.000}. > PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE and type > GL_UNSIGNED_INT, generated color (1.000, 0.341, 0.925, 0.949). > Read back {0.267}. Expected {1.000}. > PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE_ALPHA and > type GL_HALF_FLOAT_ARB, generated color (1.000, 0.341, 0.925, 0.949). > Read back {2.266, 0.949}. Expected {1.000, 0.949}. > PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE_ALPHA and > type GL_BYTE, generated color (1.000, 0.341, 0.925, 0.949). > Read back {0.255, 0.945}. Expected {1.000, 0.949}. > PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE_ALPHA and > type GL_UNSIGNED_BYTE, generated color (1.000, 0.341, 0.925, 0.949). > Read back {0.255, 0.949}. Expected {1.000, 0.949}. > PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE_ALPHA and > type GL_SHORT, generated color (1.000, 0.341, 0.925, 0.949). > Read back {0.267, 0.949}. Expected {1.000, 0.949}. > PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE_ALPHA and > type GL_INT, generated color (1.000, 0.341, 0.925, 0.949). > Read back {-1.000, 0.949}. Expected {1.000, 0.949}. > PixelConvertCompareRead ERROR: Test failed with format GL_LUMINANCE_ALPHA and > type GL_UNSIGNED_INT, generated color (1.000, 0.341, 0.925, 0.949). > Read back {0.267, 0.949}. Expected {1.000, 0.949}.
I'm changing the component to "Mesa core" because the conversions happen there. I suspect this same bug occurs with swrast.
Ian, can you follow up with this bug?
Created attachment 45783 [details] [review] workaround Does the attached patch fix the bug?
(In reply to comment #7) > Created an attachment (id=45783) [details] > workaround > > Does the attached patch fix the bug? That fixes the test case here. It seems like the tests that cause IMAGE_CLAMP_BIT to be set for the read case should be refactored to a utility function that, as your patch suggests, can be called from the callers of _mesa_pack_rgba_span_float.
Confirm the patch fix the bug.
Please try this patch which should be the final fix: http://lists.freedesktop.org/archives/mesa-dev/2011-April/006910.html
The final patch fixes the bug on pineview. Tested by: Fang Xun <xunx.fang@intel.com>
Fixed with 1faf079a692bbf4b24c8e83fa2b331c1e3b58e13. Closing.
Verified with mesa master fc30910c65e7ab078b900c29d2066e45d3edd8c2.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.