From 5b6c7da460b8f6c908df7060ec0709a9848ce160 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 25 Aug 2015 21:13:13 +1000 Subject: [PATCH] mesa: handle SwapBytes in compressed texture get code. This case just wasn't handled, so add support for it. Cc: "11.0" Reviewed-by: Brian Paul Signed-off-by: Dave Airlie --- 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; } -- 2.7.4