Module: Mesa
Branch: master
Commit: 5b6c7da460b8f6c908df7060ec0709a9848ce160
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b6c7da460b8f6c908df7060ec0709a9848ce160

Author: Dave Airlie <airl...@gmail.com>
Date:   Tue Aug 25 21:13:13 2015 +1000

mesa: handle SwapBytes in compressed texture get code.

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

Cc: "11.0" <mesa-sta...@lists.freedesktop.org>
Reviewed-by: Brian Paul <bri...@vmware.com>
Signed-off-by: Dave Airlie <airl...@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 a1fd338..682b727 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, dest);
+      }
+
       tempSlice += 4 * width * height;
    }
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to