diff options
author | Dave Airlie <[email protected]> | 2015-08-25 21:13:13 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2015-09-02 09:17:29 +1000 |
commit | 5b6c7da460b8f6c908df7060ec0709a9848ce160 (patch) | |
tree | 79f55da1341a4ab8e109f1a8e5e0d886daca5c99 /src/mesa/main/texgetimage.c | |
parent | 0ad3a475ef81dad3baf607d749b91dfa1700ca23 (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]>
Diffstat (limited to 'src/mesa/main/texgetimage.c')
-rw-r--r-- | src/mesa/main/texgetimage.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; } |