From: Dave Airlie Date: Tue, 25 Aug 2015 11:13:13 +0000 (+1000) Subject: mesa: handle SwapBytes in compressed texture get code. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5b6c7da460b8f6c908df7060ec0709a9848ce160;p=mesa.git 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 --- diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index a1fd33851f2..682b72755c7 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; }