summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_readpix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_readpix.c')
-rw-r--r--src/mesa/swrast/s_readpix.c12
1 files changed, 8 insertions, 4 deletions
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);