Browse Source

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>
tags/17.0-branchpoint
Nicolai Hähnle 8 years ago
parent
commit
78314c57cb
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/mesa/state_tracker/st_cb_texture.c

+ 6
- 0
src/mesa/state_tracker/st_cb_texture.c 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;
}


Loading…
Cancel
Save