[Mesa-dev] [PATCH 3/3] i965: Export format comparison for blitting between miptrees
Alexander Monakov
amonakov at gmail.com
Tue Jun 9 14:24:02 PDT 2015
Hello,
Unfortunately, this patch breaks things further, because...
On Fri, Jun 5, 2015 at 5:14 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> @@ -76,8 +77,14 @@ do_blit_drawpixels(struct gl_context * ctx,
> struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0];
> struct intel_renderbuffer *irb = intel_renderbuffer(rb);
>
> - if (!_mesa_format_matches_format_and_type(irb->mt->format, format, type,
> - false)) {
> + mesa_format src_format = _mesa_format_from_format_and_type(format, type);
_mesa_format_from_format_and_type may return either mesa_format or
mesa_array_format, which needs further decoding since here we do need
a mesa_format. The attached patch unbreaks this — please apply it for
me if reviewed.
Thanks.
Alexander
-------------- next part --------------
From 2078c405133b321610a765e43784f30eddd0e722 Mon Sep 17 00:00:00 2001
From: Alexander Monakov <amonakov at gmail.com>
Date: Tue, 9 Jun 2015 20:58:22 +0300
Subject: [PATCH] i965: do_blit_drawpixels: decode array formats
Correct a regression introduced by commit 922c0c9fd526 by converting "array
format", if received from _mesa_format_from_format_and_type, to mesa_format.
References: https://bugs.freedesktop.org/show_bug.cgi?id=90839
Signed-off-by: Alexander Monakov <amonakov at gmail.com>
Tested-by: AnAkkk <anakin.cs at gmail.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Kenneth Graunke <kenneth at whitecape.org>
Cc: mesa-stable at lists.freedesktop.org
---
src/mesa/drivers/dri/i965/intel_pixel_draw.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_draw.c b/src/mesa/drivers/dri/i965/intel_pixel_draw.c
index d39c698..96af286 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_draw.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_draw.c
@@ -78,6 +78,8 @@ do_blit_drawpixels(struct gl_context * ctx,
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
mesa_format src_format = _mesa_format_from_format_and_type(format, type);
+ if (_mesa_format_is_mesa_array_format(src_format))
+ src_format = _mesa_format_from_array_format(src_format);
mesa_format dst_format = irb->mt->format;
/* We can safely discard sRGB encode/decode for the DrawPixels interface */
--
2.3.6
More information about the mesa-dev
mailing list