Summary: | [bisected pineview] oglc case pxconv-read failed | ||
---|---|---|---|
Product: | Mesa | Reporter: | fangxun <xunx.fang> |
Component: | Mesa core | Assignee: | Marek Olšák <maraeo> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | high | CC: | idr, maraeo |
Version: | git | ||
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | workaround |
Description
fangxun
2011-03-31 20:07:16 UTC
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.