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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user