[Mesa-dev] [PATCH 2/3] i965: Use _mesa_format_x_to_a to support more X -> A blits.

Eric Anholt eric at anholt.net
Wed Mar 26 14:44:39 PDT 2014


Kenneth Graunke <kenneth at whitecape.org> writes:

> There's really no reason to limit ourselves to a single format; the
> technique works just as well for any format in this family.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>


> -   if (src_mt->format == MESA_FORMAT_B8G8R8X8_UNORM &&
> -       dst_mt->format == MESA_FORMAT_B8G8R8A8_UNORM) {
> +   if (src_mt->format != dst_mt->format &&
> +       _mesa_format_x_to_a(src_mt->format) == dst_mt->format) {
>        intel_miptree_set_alpha_to_one(brw, dst_mt,
>                                       dst_x, dst_y,
>                                       width, height);

intel_miptree_set_alpha_to_one only works for B8G8R8A8 -- you can't
convince the blitter to set arbitrary subsets of bits.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140326/91784563/attachment.sig>


More information about the mesa-dev mailing list