1D convolution (and post-conv scale/bias) were inadvertantly applied to 2D image...
authorBrian <brian@yutani.localnet.net>
Wed, 21 Mar 2007 15:44:03 +0000 (09:44 -0600)
committerBrian <brian@yutani.localnet.net>
Wed, 21 Mar 2007 15:44:03 +0000 (09:44 -0600)
src/mesa/swrast/s_copypix.c
src/mesa/swrast/s_drawpix.c
src/mesa/swrast/s_readpix.c

index 7e8ebb4477c6d531db1222328843b1831be7e0b4..b318777072ae43c0fcd8578371c51cfc5182bdca 100644 (file)
@@ -199,7 +199,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
    GLint sy, dy, stepy, row;
    const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
    GLint overlapping;
-   const GLuint transferOps = ctx->_ImageTransferState;
+   GLuint transferOps = ctx->_ImageTransferState;
    SWspan span;
 
    if (!ctx->ReadBuffer->_ColorReadBuffer) {
@@ -211,6 +211,11 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
       copy_conv_rgba_pixels(ctx, srcx, srcy, width, height, destx, desty);
       return;
    }
+   else if (ctx->Pixel.Convolution1DEnabled) {
+      /* make sure we don't apply 1D convolution */
+      transferOps &= ~(IMAGE_CONVOLUTION_BIT |
+                       IMAGE_POST_CONVOLUTION_SCALE_BIAS);
+   }
 
    /* Determine if copy should be done bottom-to-top or top-to-bottom */
    if (srcy < desty) {
index d97d53e83b4d55185cc7c9a5b8eca03be7c56d65..99ad71143e04cbab682334fe6e9084210872fc70 100644 (file)
@@ -619,6 +619,11 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
       type = GL_FLOAT;
       transferOps &= IMAGE_POST_CONVOLUTION_BITS;
    }
+   else if (ctx->Pixel.Convolution1DEnabled) {
+      /* we only want to apply 1D convolution to glTexImage1D */
+      transferOps &= ~(IMAGE_CONVOLUTION_BIT |
+                       IMAGE_POST_CONVOLUTION_SCALE_BIAS);
+   }
 
    if (ctx->DrawBuffer->_NumColorDrawBuffers[0] > 0 &&
        ctx->DrawBuffer->_ColorDrawBuffers[0][0]->DataType != GL_FLOAT &&
index c5524c0630681824a55a67191291ac94abbd359a..7dc48aec6819123125b62306f98c585e9f311fee 100644 (file)
@@ -410,6 +410,10 @@ read_rgba_pixels( GLcontext *ctx,
          = (GLubyte *) _mesa_image_address2d(packing, pixels, width, height,
                                              format, type, 0, 0);
 
+      /* make sure we don't apply 1D convolution */
+      transferOps &= ~(IMAGE_CONVOLUTION_BIT |
+                       IMAGE_POST_CONVOLUTION_SCALE_BIAS);
+
       for (row = 0; row < height; row++, y++) {
 
          /* Get float rgba pixels */