diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/colortab.c | 2 | ||||
-rw-r--r-- | src/mesa/main/convolve.c | 6 | ||||
-rw-r--r-- | src/mesa/main/histogram.c | 2 | ||||
-rw-r--r-- | src/mesa/main/image.c | 9 | ||||
-rw-r--r-- | src/mesa/main/image.h | 2 | ||||
-rw-r--r-- | src/mesa/main/texstore.c | 6 |
6 files changed, 15 insertions, 12 deletions
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c index b05c0513aa6..bd9cf438b4f 100644 --- a/src/mesa/main/colortab.c +++ b/src/mesa/main/colortab.c @@ -718,7 +718,7 @@ _mesa_GetColorTable( GLenum target, GLenum format, } _mesa_pack_rgba_span_float(ctx, table->Size, rgba, - format, type, data, &ctx->Pack, 0x0, GL_FALSE); + format, type, data, &ctx->Pack, 0x0); if (ctx->Pack.BufferObj->Name) { ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c index 63b652bf705..814c6a0a5a6 100644 --- a/src/mesa/main/convolve.c +++ b/src/mesa/main/convolve.c @@ -626,7 +626,7 @@ _mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, row, 0); GLfloat (*src)[4] = (GLfloat (*)[4]) (filter->Filter + row * filter->Width * 4); _mesa_pack_rgba_span_float(ctx, filter->Width, src, - format, type, dst, &ctx->Pack, 0x0, GL_FALSE); + format, type, dst, &ctx->Pack, 0x0); } if (ctx->Pack.BufferObj->Name) { @@ -836,7 +836,7 @@ _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, format, type, 0); _mesa_pack_rgba_span_float(ctx, filter->Width, (GLfloat (*)[4]) filter->Filter, - format, type, dst, &ctx->Pack, 0x0, GL_FALSE); + format, type, dst, &ctx->Pack, 0x0); } /* Column filter */ @@ -845,7 +845,7 @@ _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, format, type, 0); GLfloat (*src)[4] = (GLfloat (*)[4]) (filter->Filter + colStart); _mesa_pack_rgba_span_float(ctx, filter->Height, src, - format, type, dst, &ctx->Pack, 0x0, GL_FALSE); + format, type, dst, &ctx->Pack, 0x0); } (void) span; /* unused at this time */ diff --git a/src/mesa/main/histogram.c b/src/mesa/main/histogram.c index febf8d99c45..905c1ad8301 100644 --- a/src/mesa/main/histogram.c +++ b/src/mesa/main/histogram.c @@ -684,7 +684,7 @@ _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvo minmax[1][BCOMP] = CLAMP(ctx->MinMax.Max[BCOMP], 0.0F, 1.0F); minmax[1][ACOMP] = CLAMP(ctx->MinMax.Max[ACOMP], 0.0F, 1.0F); _mesa_pack_rgba_span_float(ctx, 2, minmax, - format, type, values, &ctx->Pack, 0x0, GL_FALSE); + format, type, values, &ctx->Pack, 0x0); } if (ctx->Pack.BufferObj->Name) { diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 44972ae8e2c..5cb110f3a5d 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -1677,7 +1677,6 @@ _mesa_apply_stencil_transfer_ops(const GLcontext *ctx, GLuint n, * Used to pack an array [][4] of RGBA float colors as specified * by the dstFormat, dstType and dstPacking. Used by glReadPixels, * glGetConvolutionFilter(), etc. - * Incoming colors will be clamped to [0,1] if needed. * Note: the rgba values will be modified by this function when any pixel * transfer ops are enabled. */ @@ -1686,13 +1685,17 @@ _mesa_pack_rgba_span_float(GLcontext *ctx, GLuint n, GLfloat rgba[][4], GLenum dstFormat, GLenum dstType, GLvoid *dstAddr, const struct gl_pixelstore_attrib *dstPacking, - GLbitfield transferOps, GLboolean noClamp) + GLbitfield transferOps) { GLfloat luminance[MAX_WIDTH]; const GLint comps = _mesa_components_in_format(dstFormat); GLuint i; - if ((!noClamp) && (dstType != GL_FLOAT || ctx->Color.ClampReadColor == GL_TRUE)) { + /* XXX + * This test should probably go away. Have the caller set/clear the + * IMAGE_CLAMP_BIT as needed. + */ + if (dstType != GL_FLOAT || ctx->Color.ClampReadColor == GL_TRUE) { /* need to clamp to [0, 1] */ transferOps |= IMAGE_CLAMP_BIT; } diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h index fb7a5c0e903..b26c27e5a8a 100644 --- a/src/mesa/main/image.h +++ b/src/mesa/main/image.h @@ -178,7 +178,7 @@ extern void _mesa_pack_rgba_span_float( GLcontext *ctx, GLuint n, GLfloat rgba[][4], GLenum dstFormat, GLenum dstType, GLvoid *dstAddr, const struct gl_pixelstore_attrib *dstPacking, - GLbitfield transferOps, GLboolean noClamp ); + GLbitfield transferOps ); extern void diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 28e9d5c3ecb..bde69b11485 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -417,7 +417,7 @@ make_temp_float_image(GLcontext *ctx, GLuint dims, (GLfloat (*)[4]) src, logicalBaseFormat, GL_FLOAT, dst, &ctx->DefaultPacking, - postConvTransferOps, GL_FALSE); + postConvTransferOps); src += convWidth * 4; dst += convWidth * logComponents; } @@ -4102,7 +4102,7 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level, } _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba, format, type, dest, - &ctx->Pack, transferOps, GL_TRUE); + &ctx->Pack, transferOps); } #endif /* FEATURE_EXT_texture_sRGB */ else { @@ -4146,7 +4146,7 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level, } _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba, format, type, dest, - &ctx->Pack, transferOps, GL_FALSE); + &ctx->Pack, transferOps); } /* format */ } /* row */ } /* img */ |