[Mesa-dev] [Bug 46631] It's really hard to hit the fast path for the fallback glReadPixels code
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Feb 26 09:19:43 PST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=46631
--- Comment #5 from Neil Roberts <neil at linux.intel.com> 2012-02-26 09:19:43 PST ---
Created attachment 57667
--> https://bugs.freedesktop.org/attachment.cgi?id=57667
Test case showing reading luminance values
Ok, I've split the patch into two.
I'm attaching a test case which shows what happens when luminance values are
read from an FBO wrapping a luminance texture. The texture is created with a
single pixel with the value 1. When the pixel is read back from glReadPixels it
becomes 3, which implies Mesa really is adding the components together. I can
only test this with the software rasterizer because the Intel driver doesn't
seem to like creating an FBO to a luminance texture.
The GL spec just says it reads luminance values by putting the value in all
three of the components and writes luminance values by adding the components
together so I think Mesa is doing the right thing here, even though in practice
this is probably not very helpful. If the spec meant for it to be any other way
presumably there would have to mention a special case when the formats are both
the same, but I could not find this.
Interestingly however, if I try this with the Nvidia proprietary drivers it
returns 1, so it is just directly copying the data. It seems to me like this is
a bug in Nvidia. Presumably nobody cares because the spec makes no sense.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the mesa-dev
mailing list