[Mesa-dev] [PATCH] mesa/pack: don't apply transfer operations to integer format buffers.

Dave Airlie airlied at gmail.com
Mon Sep 12 06:46:30 PDT 2011


From: Dave Airlie <airlied at redhat.com>

The EXT_texture_integer issues says:

Should pixel transfer operations be defined for the integer pixel
path?

RESOLVED: No.  Fragment shaders can achieve similar results
with more flexibility.  There is no need to aggrandize this
legacy mechanism.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mesa/main/pack.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c
index fd3f89d..98aec2f 100644
--- a/src/mesa/main/pack.c
+++ b/src/mesa/main/pack.c
@@ -506,7 +506,9 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
       luminance = NULL;
    }
 
-   if (transferOps) {
+   /* EXT_texture_integer specifies no transfer ops on integer
+      types in the resolved issues section */
+   if (transferOps && !intDstFormat) {
       _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
    }
 
-- 
1.7.6



More information about the mesa-dev mailing list