From 9c7b81697b2a381d7083e8e4c52f919f36ea9fa1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 23 Jul 2003 21:21:30 +0000 Subject: fix a few more glitches from last big check-in --- src/mesa/main/image.c | 12 ++++++------ src/mesa/main/pixel.c | 4 ++++ src/mesa/main/state.c | 12 +++--------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 171efb5b24..b9f026d7e6 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -979,11 +979,11 @@ _mesa_pack_float_rgba_span( GLcontext *ctx, } /* update histogram count */ if (transferOps & IMAGE_HISTOGRAM_BIT) { -/* _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); */ + _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); } /* min/max here */ if (transferOps & IMAGE_MIN_MAX_BIT) { -/* _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); */ + _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); if (ctx->MinMax.Sink) { UNDEFARRAY(rgbaCopy); /* mac 32k limitation */ return; @@ -2852,11 +2852,11 @@ _mesa_unpack_chan_color_span( GLcontext *ctx, } /* update histogram count */ if (transferOps & IMAGE_HISTOGRAM_BIT) { -/* _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); */ + _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); } /* min/max here */ if (transferOps & IMAGE_MIN_MAX_BIT) { -/* _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); */ + _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); } } @@ -3129,11 +3129,11 @@ _mesa_unpack_float_color_span( GLcontext *ctx, } /* update histogram count */ if (transferOps & IMAGE_HISTOGRAM_BIT) { -/* _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); */ + _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); } /* min/max here */ if (transferOps & IMAGE_MIN_MAX_BIT) { -/* _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); */ + _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); } } diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index 31ab8d7a72..80ddeb270b 100644 --- a/src/mesa/main/pixel.c +++ b/src/mesa/main/pixel.c @@ -1502,6 +1502,8 @@ void _mesa_init_pixel( GLcontext * ctx ) ctx->Pack.SkipImages = 0; ctx->Pack.SwapBytes = GL_FALSE; ctx->Pack.LsbFirst = GL_FALSE; + ctx->Pack.ClientStorage = GL_FALSE; + ctx->Pack.Invert = GL_FALSE; ctx->Unpack.Alignment = 4; ctx->Unpack.RowLength = 0; ctx->Unpack.ImageHeight = 0; @@ -1510,6 +1512,8 @@ void _mesa_init_pixel( GLcontext * ctx ) ctx->Unpack.SkipImages = 0; ctx->Unpack.SwapBytes = GL_FALSE; ctx->Unpack.LsbFirst = GL_FALSE; + ctx->Unpack.ClientStorage = GL_FALSE; + ctx->Unpack.Invert = GL_FALSE; if (ctx->Visual.doubleBufferMode) { ctx->Pixel.ReadBuffer = GL_BACK; diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 2683556f02..b8eb080f6a 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -731,13 +731,6 @@ _mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize) /*@{*/ - - - - - - - /* * Update items which depend on vertex/fragment programs. */ @@ -786,12 +779,13 @@ void _mesa_update_state( GLcontext *ctx ) if (new_state & _NEW_LIGHT) _mesa_update_lighting( ctx ); + if (new_state & _IMAGE_NEW_TRANSFER_STATE) + _mesa_update_pixel( ctx, new_state ); if (new_state & _NEW_PROGRAM) update_program( ctx ); - - /* ctx->_NeedEyeCoords is now uptodate. + /* ctx->_NeedEyeCoords is now up to date. * * If the truth value of this variable has changed, update for the * new lighting space and recompute the positions of lights and the -- cgit v1.2.3