OSDN Git Service

i915: Blit RGBX<->RGBA drawpixels
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 5 Jun 2015 13:33:36 +0000 (14:33 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 1 Jul 2015 14:22:38 +0000 (15:22 +0100)
commit22d7f3ceca1b09a3c6b26b6935db99bf9ed3caa9
tree0a3d9d4039fb31c8da6c5f48fe13cff214aa6302
parent074122fbe34bc077ea3fc754c3696298f433d41b
i915: Blit RGBX<->RGBA drawpixels

The blitter already has code to accommodate filling in the alpha channel
for BGRX destination formats, so expand this to also allow filling the
alpha channgel in RGBX formats.

More importantly for the next patch is moving the test into its own
function for the purpose of exporting the check to the callers.

v2: Fix alpha expansion as spotted by Alexander with the fix suggested by
Kenneth

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Alexander Monakov <amonakov@gmail.com>
Cc: Kristian Høgsberg <krh@bitplanet.net>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit c2d0606827412b710dcaed80268fc665de8c9c5d)
src/mesa/drivers/dri/i965/intel_blit.c