[Mesa-dev] [PATCH 2/2] mesa: handle SwapBytes in compressed texture get code.

Dave Airlie airlied at gmail.com
Mon Aug 31 21:50:42 PDT 2015


This case just wasn't handled, so add support for it.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mesa/main/texgetimage.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 0c23687..52ed1ef 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -361,6 +361,13 @@ get_tex_rgba_compressed(struct gl_context *ctx, GLuint dimensions,
                            tempSlice, RGBA32_FLOAT, srcStride,
                            width, height,
                            needsRebase ? rebaseSwizzle : NULL);
+
+      /* Handle byte swapping if required */
+      if (ctx->Pack.SwapBytes) {
+         _mesa_swap_bytes_2d_image(format, type, &ctx->Pack,
+                                   width, height, dest, NULL);
+      }
+
       tempSlice += 4 * width * height;
    }
 
-- 
2.4.3



More information about the mesa-dev mailing list