summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_readpix.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2000-11-05 18:24:40 +0000
committerKeith Whitwell <[email protected]>2000-11-05 18:24:40 +0000
commitcd03ed4f54444d96e4e47cdb118a3dfd94d92bb0 (patch)
tree57d9620635286b4ee4b8adf950014113d5961017 /src/mesa/swrast/s_readpix.c
parent7c20642b1091df1aab7d9076a3fe2fb11c6f011c (diff)
Reorganized software rasterizer as a module which manages its own state,
with tighter interfaces with the rest of the world. Proper documentation to come.
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 74a4d682661..ba3aca53927 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);