[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 11:52:37 PST 2012


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

Kurt Roeckx <kurt at roeckx.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kurt at roeckx.be

--- Comment #7 from Kurt Roeckx <kurt at roeckx.be> 2012-02-26 11:52:37 PST ---
(In reply to comment #6)
> 
> This seems wrong. If you specify luminance as 1 and read back luminance, you
> should receive 1.

That makes sense to me too.

> If you're reading GL_LUMINANCE from an RGB texture, adding the values L = R + G
> + B is certainly conformant

I understand things it should do:
Y = (R*RedScale+RedBias)+(G*GreenScale+GreenBias)+(B*BlueScale+BlueBias)

Where you would normally want to set the scales to something sane, like 0.299,
0.587, 0.114.

Settings like 1/3 for the scales don't make sense to me if you really want
luminance, but would clearly be better than the default of 1.  With a scale
of 1 you would have a problem with the clamping to [0,1].

> If you supply RGB values to TexImage, you would have to supply (for instance) R
> = G = B = 1/3 to achieve luminance 1, and adding those 3 * 1/3 back together
> ... it's a bug in mesa.

No, you set R, G and B to 1, and set the scales with glPixelTransferf() to get
the desired effect.


Kurt

-- 
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