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 <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
This commit is contained in:
Nicolai Hähnle 2016-11-09 15:49:22 +01:00
parent 22360406f7
commit 78314c57cb

View file

@ -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;
}