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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Oct 24 10:14:58 PDT 2014


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

--- Comment #41 from Jason Ekstrand <jason at jlekstrand.net> ---
(In reply to Iago Toral from comment #39)
> From your explanations I think this is what we should do too. For example,
> when the source type is RGBA ubyte, we will do something like this:
> 
> if (src_array_format.as_uint == RGBA8888_UBYTE.as_uint &&
>     !_mesa_is_format_integer_color(dst_format) {
>    // Call pack function here
> }
> 
> instead of:
> 
> if (src_array_format.as_uint == RGBA8888_UBYTE.as_uint) {
>     assert(!_mesa_is_format_integer_color(dst_format));
>    // Call pack function here
> }
> 
> That way, if dst is an integer type we will fall back to
> _mesa_swizzle_and_convert (if both src and dst are array types) or, as last
> resort, to the src->rgba->dst conversion path.

Yes, that seems perfectly reasonable.

-- 
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/20141024/0fcb0c63/attachment-0001.html>


More information about the mesa-dev mailing list