From b6adf336f41d2f0ed0ea33eaf53faee9635a2405 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 14 Mar 2007 14:33:46 -0600 Subject: Re-org of gl_pixel_attrib struct. Reorder fields according to the order in which the pixel transfer operations take place. Improve comments. Move the pixel maps out of gl_pixel_attrib since they're not supposed to be pushed/popped by glPush/PopAttrib. New gl_pixelmap and gl_pixelmaps structs to contain the pixelmaps. --- src/mesa/main/image.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/mesa/main/image.c') diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index a60f4d3f4d..cdcf49886a 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -1129,11 +1129,11 @@ _mesa_apply_ci_transfer_ops(const GLcontext *ctx, GLbitfield transferOps, shift_and_offset_ci(ctx, n, indexes); } if (transferOps & IMAGE_MAP_COLOR_BIT) { - const GLuint mask = ctx->Pixel.MapItoIsize - 1; + const GLuint mask = ctx->PixelMaps.ItoI.Size - 1; GLuint i; for (i = 0; i < n; i++) { const GLuint j = indexes[i] & mask; - indexes[i] = IROUND(ctx->Pixel.MapItoI[j]); + indexes[i] = IROUND(ctx->PixelMaps.ItoI.Map[j]); } } } @@ -1169,10 +1169,10 @@ _mesa_apply_stencil_transfer_ops(const GLcontext *ctx, GLuint n, } } if (ctx->Pixel.MapStencilFlag) { - GLuint mask = ctx->Pixel.MapStoSsize - 1; + GLuint mask = ctx->PixelMaps.StoS.Size - 1; GLuint i; for (i = 0; i < n; i++) { - stencil[i] = ctx->Pixel.MapStoS[ stencil[i] & mask ]; + stencil[i] = ctx->PixelMaps.StoS.Map[ stencil[i] & mask ]; } } } @@ -3691,10 +3691,10 @@ _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n, if (ctx->Pixel.MapStencilFlag) { /* Apply stencil lookup table */ - GLuint mask = ctx->Pixel.MapStoSsize - 1; + GLuint mask = ctx->PixelMaps.StoS.Size - 1; GLuint i; for (i=0;iPixel.MapStoS[ indexes[i] & mask ]; + indexes[i] = ctx->PixelMaps.StoS.Map[ indexes[i] & mask ]; } } } -- cgit v1.2.3