summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-08-25 21:13:13 +1000
committerEmil Velikov <[email protected]>2015-09-06 18:35:14 +0100
commitdcb220f2f700bba0709fa246417f1e89676acbbb (patch)
treeec91a76caf48490499320843a05dac33090fa1bf /src
parentd9534e4785b26a0c65153dad934ab8a03723d89c (diff)
mesa: handle SwapBytes in compressed texture get code.
This case just wasn't handled, so add support for it. Cc: "11.0" <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit 5b6c7da460b8f6c908df7060ec0709a9848ce160)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/texgetimage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 5eb7bf5c94d..303a01fe90e 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;
}