[Mesa-dev] [Bug 84566] Unify the format conversion code

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Oct 29 09:33:50 PDT 2014


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

--- Comment #45 from Jason Ekstrand <jason at jlekstrand.net> ---
(In reply to Iago Toral from comment #44)
> (In reply to Iago Toral from comment #43)
> (...)
> > 3) Luminance formats have special requirements. A conversion to Luminance
> > from RGBA requires to do L=R+G+B for example. This is something that
> > _mesa_format_convert cannot achieve at the moment, because neither
> > pack/unpack functions nor _mesa_swizzle_and_convert do this kind of
> > operation, so I wonder what is the right thing to do here. We could run
> > another pass that computes these values after the conversion. We could do
> > this inside _mesa_format_convert or in the client, after calling
> > _mesa_format_convert I suppose there are no other options. The current code
> > does another pass specifically for this, right before packing to the dst.
> 
> And likewise, a conversion to RGBA from Luminance requires to do
> R=L,G=0,B=0,A=1, but unpack functions and _mesa_swizzle_and_convert will do
> R=L,G=L,B=L,A=1, so again we need another pass to correct this to the
> expected result.

That one should be easy.  We can just have a fake internal format for RA.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141029/43e7de82/attachment.html>


More information about the mesa-dev mailing list