summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/image.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-03-14 14:33:46 -0600
committerBrian <[email protected]>2007-03-14 14:33:46 -0600
commitb6adf336f41d2f0ed0ea33eaf53faee9635a2405 (patch)
treeb4676a4e10ca3331990dac29b344746173f99741 /src/mesa/main/image.c
parent3049946fa742b654afa9b24f8bc79f387f01aea9 (diff)
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.
Diffstat (limited to 'src/mesa/main/image.c')
-rw-r--r--src/mesa/main/image.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index a60f4d3f4d8..cdcf49886ad 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;i<n;i++) {
- indexes[i] = ctx->Pixel.MapStoS[ indexes[i] & mask ];
+ indexes[i] = ctx->PixelMaps.StoS.Map[ indexes[i] & mask ];
}
}
}