diff options
author | Iago Toral Quiroga <[email protected]> | 2014-10-29 13:32:43 +0100 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2015-01-12 11:20:29 +0100 |
commit | d71a1adff253aa75a3474723209c35831bb3f048 (patch) | |
tree | c76d0ebf4fbe34b10a6ada644dad7b67beb505ad /src/mesa/tnl/t_context.h | |
parent | a177b30f1f2a74c14a649e9990eaab8826523c69 (diff) |
mesa: Add RGBA to Luminance conversion helpers
For glReadPixels with a Luminance destination format we compute luminance
values from RGBA as L=R+G+B. This, however, requires ad-hoc implementation,
since pack/unpack functions or _mesa_swizzle_and_convert won't do this
(and thus, neither will _mesa_format_convert). This patch adds helpers
to do this computation so they can be used to support conversion to luminance
formats.
The current implementation of glReadPixels does this computation as part
of the span functions in pack.c (see _mesa_pack_rgba_span_float), that do
this together with other things like type conversion, etc. We do not want
to use these functions but use _mesa_format_convert instead (later patches
will remove the color span functions), so we need to extract this functionality
as helpers.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/tnl/t_context.h')
0 files changed, 0 insertions, 0 deletions