i965: do_blit_drawpixels: decode array formats
authorAlexander Monakov <amonakov@gmail.com>
Tue, 9 Jun 2015 17:58:22 +0000 (20:58 +0300)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 11 Jun 2015 07:15:37 +0000 (00:15 -0700)
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@gmail.com>
Tested-by: AnAkkk <anakin.cs@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
src/mesa/drivers/dri/i965/intel_pixel_draw.c

index d68cbb6e40142d03625d6ece8ab7dab4f28e6772..189a592d8d208127c84870dd18b231f5fde14ce7 100644 (file)
@@ -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 */