i965: Reenable glBitmap() after the sRGB winsys enabling.
authorEric Anholt <eric@anholt.net>
Thu, 19 Sep 2013 15:45:07 +0000 (08:45 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 30 Sep 2013 23:49:43 +0000 (16:49 -0700)
The format of the window system framebuffer changed from ARGB8888 to
SARGB8, but we're still supposed to render to it the same as ARGB8888
unless the user flipped the GL_FRAMEBUFFER_SRGB switch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
NOTE: This is a candidate for stable branches.

src/mesa/drivers/dri/i965/intel_pixel_bitmap.c

index 5398cb878ef68fd620233356bc1c6ae0c0bbe188..91f21a3ca4ee1766a33330d55d1e3e48331154ef 100644 (file)
@@ -25,6 +25,7 @@
  * 
  **************************************************************************/
 
+#include "main/blend.h"
 #include "main/glheader.h"
 #include "main/enums.h"
 #include "main/image.h"
@@ -227,7 +228,7 @@ do_blit_bitmap( struct gl_context *ctx,
    UNCLAMPED_FLOAT_TO_UBYTE(ubcolor[2], tmpColor[2]);
    UNCLAMPED_FLOAT_TO_UBYTE(ubcolor[3], tmpColor[3]);
 
-   switch (irb->mt->format) {
+   switch (_mesa_get_render_format(ctx, intel_rb_format(irb))) {
    case MESA_FORMAT_ARGB8888:
    case MESA_FORMAT_XRGB8888:
       color = PACK_COLOR_8888(ubcolor[3], ubcolor[0], ubcolor[1], ubcolor[2]);