Module: Mesa Branch: master Commit: 78314c57cb8c64dac1ce04f17682db4ffc58effc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=78314c57cb8c64dac1ce04f17682db4ffc58effc
Author: Nicolai Hähnle <[email protected]> Date: Wed Nov 9 15:49:22 2016 +0100 st/mesa: swap bytes in the fallback format translation path of GetTexImage Fixes parts of GL45-CTS.gtf32.GL3Tests.packed_pixels.packed_pixels_pixelstore. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> --- src/mesa/state_tracker/st_cb_texture.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index e358c73..7c493fc 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -2073,6 +2073,12 @@ st_GetTexSubImage(struct gl_context * ctx, rgba, RGBA32_FLOAT, srcStride, width, height, NULL); + /* Handle byte swapping if required */ + if (ctx->Pack.SwapBytes) { + _mesa_swap_bytes_2d_image(format, type, &ctx->Pack, + width, height, dest, dest); + } + map += tex_xfer->layer_stride; } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
