[Mesa-dev] [PATCH 2/3] i915: Blit RGBX<->RGBA drawpixels
Alexander Monakov
amonakov at gmail.com
Sat Jun 6 02:58:05 PDT 2015
On Fri, Jun 5, 2015 at 5:14 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> 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.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Jason Ekstrand <jason at jlekstrand.net>
> Cc: Alexander Monakov <amonakov at gmail.com>
> Cc: Kristian Høgsberg <krh at bitplanet.net>
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> ---
> src/mesa/drivers/dri/i965/intel_blit.c | 38 +++++++++++++++++++++++++++-------
> 1 file changed, 30 insertions(+), 8 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
> index 360bfe8..02666dc 100644
> --- a/src/mesa/drivers/dri/i965/intel_blit.c
> +++ b/src/mesa/drivers/dri/i965/intel_blit.c
[snip]
> @@ -269,12 +290,13 @@ intel_miptree_blit(struct brw_context *brw,
> return false;
> }
>
> - if (src_mt->format == MESA_FORMAT_B8G8R8X8_UNORM &&
> - dst_mt->format == MESA_FORMAT_B8G8R8A8_UNORM) {
> + /* XXX This could be done in a single pass using XY_FULL_MONO_PATTERN_BLT */
> + if (src_format != dst_format &&
> + (dst_format == MESA_FORMAT_B8G8R8X8_UNORM ||
> + dst_format == MESA_FORMAT_R8G8B8X8_UNORM))
This change seems to invert the logic: previously the second pass is
done when dst is BGRA, now it's done if dst is BGRX. Is that intended?
Alexander
More information about the mesa-dev
mailing list