mesa: implement clamping controls (ARB_color_buffer_float)
[mesa.git] / src / mesa / main / pack.c
index 6d524e64908d1c7c2b8901cb6280ac91d2bf507a..02154585acae452ea95f2a495e15e294b0573a5b 100644 (file)
@@ -34,6 +34,7 @@
 #include "enums.h"
 #include "image.h"
 #include "imports.h"
+#include "mtypes.h"
 #include "pack.h"
 #include "pixeltransfer.h"
 #include "imports.h"
@@ -503,17 +504,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
       luminance = NULL;
    }
 
-   /* 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) {
-      if (!intDstFormat) {
-         /* need to clamp to [0, 1] */
-         transferOps |= IMAGE_CLAMP_BIT;
-      }
-   }
-
    if (transferOps) {
       _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
    }