From 156e37d3879b316329e3e05579414031da2647e2 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 14 Nov 2011 09:38:56 +0100 Subject: libX11 libXext libXinerama libXmu libfontenc libxcb mesa pixman git update 14 nov 2011 --- mesalib/src/mesa/swrast/s_readpix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mesalib/src/mesa/swrast/s_readpix.c') diff --git a/mesalib/src/mesa/swrast/s_readpix.c b/mesalib/src/mesa/swrast/s_readpix.c index 54f42db02..3cef7304a 100644 --- a/mesalib/src/mesa/swrast/s_readpix.c +++ b/mesalib/src/mesa/swrast/s_readpix.c @@ -236,6 +236,7 @@ slow_read_rgba_pixels( struct gl_context *ctx, GLbitfield transferOps ) { struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer; + const gl_format rbFormat = _mesa_get_srgb_format_linear(rb->Format); union { float f[MAX_WIDTH][4]; unsigned int i[MAX_WIDTH][4]; @@ -252,11 +253,10 @@ slow_read_rgba_pixels( struct gl_context *ctx, for (j = 0; j < height; j++) { if (_mesa_is_integer_format(format)) { - _mesa_unpack_int_rgba_row(rb->Format, width, map, rgba.i); + _mesa_unpack_int_rgba_row(rbFormat, width, map, rgba.i); _mesa_pack_rgba_span_int(ctx, width, rgba.i, format, type, dst); } else { - _mesa_unpack_rgba_row(_mesa_get_srgb_format_linear(rb->Format), - width, map, rgba.f); + _mesa_unpack_rgba_row(rbFormat, width, map, rgba.f); _mesa_pack_rgba_span_float(ctx, width, rgba.f, format, type, dst, packing, transferOps); } -- cgit v1.2.3