summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/image.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-04-03 17:28:35 -0600
committerBrian Paul <[email protected]>2009-04-03 17:28:35 -0600
commitc7eb423c49ef3e0e071deaab04dad55254f2fa30 (patch)
tree773ce651643a7281561a66ecdda1e407ec4cd4f1 /src/mesa/main/image.c
parent35d88e1ac2cd34d5cc62f521654d79f5b24fcdf8 (diff)
mesa: remove the noClamp parameter to _mesa_pack_rgba_span_float()
It was only set to GL_TRUE in one place where it isn't really needed (glGetTexImage(sRGB format)).
Diffstat (limited to 'src/mesa/main/image.c')
-rw-r--r--src/mesa/main/image.c9
1 files changed, 6 insertions, 3 deletions
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;
}