From cd03ed4f54444d96e4e47cdb118a3dfd94d92bb0 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Sun, 5 Nov 2000 18:24:40 +0000 Subject: Reorganized software rasterizer as a module which manages its own state, with tighter interfaces with the rest of the world. Proper documentation to come. --- src/mesa/swrast/s_readpix.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/mesa/swrast/s_readpix.c') diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 74a4d68266..ba3aca5392 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -1,4 +1,4 @@ -/* $Id: s_readpix.c,v 1.1 2000/10/31 18:00:04 keithw Exp $ */ +/* $Id: s_readpix.c,v 1.2 2000/11/05 18:24:40 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -36,6 +36,7 @@ #include "pixel.h" #include "s_alphabuf.h" +#include "s_context.h" #include "s_depth.h" #include "s_span.h" #include "s_stencil.h" @@ -497,7 +498,7 @@ read_fast_rgba_pixels( GLcontext *ctx, const struct gl_pixelstore_attrib *packing ) { /* can't do scale, bias, mapping, etc */ - if (ctx->ImageTransferState) + if (ctx->_ImageTransferState) return GL_FALSE; /* can't do fancy pixel packing */ @@ -636,7 +637,7 @@ static void read_rgba_pixels( GLcontext *ctx, } if (ctx->Pixel.Convolution2DEnabled || ctx->Pixel.Separable2DEnabled) { - const GLuint transferOps = ctx->ImageTransferState; + const GLuint transferOps = ctx->_ImageTransferState; GLfloat *dest, *src, *tmpImage, *convImage; GLint row; @@ -717,7 +718,7 @@ static void read_rgba_pixels( GLcontext *ctx, format, type, 0, row, 0); _mesa_pack_rgba_span(ctx, readWidth, (const GLchan (*)[4]) rgba, format, type, dst, packing, - ctx->ImageTransferState); + ctx->_ImageTransferState); } } @@ -735,6 +736,9 @@ _swrast_ReadPixels( GLcontext *ctx, { (void) pack; + if (SWRAST_CONTEXT(ctx)->NewState) + _swrast_validate_derived( ctx ); + switch (format) { case GL_COLOR_INDEX: read_index_pixels(ctx, x, y, width, height, type, pixels, &ctx->Pack); -- cgit v1.2.3