aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/x86
diff options
context:
space:
mode:
authorUlrich Weigand <[email protected]>2015-09-15 15:23:26 +0200
committerEmil Velikov <[email protected]>2015-09-17 14:59:08 +0100
commit0fe894db48f96a4c8db72e83b30f6d4965ba5eeb (patch)
treed2673ae467f299e4440c0359d55b9ee048cb056e /src/mesa/x86
parent7b583e05835b7c43fe94b580d2b6dcf1ec271cb6 (diff)
mesa: Fix texture compression on big-endian systems
Various pieces of code to create compressed textures will first generate an uncompressed RGBA texture into a temporary buffer, and then read from that buffer while creating the final compressed texture in the requested format. The code reading from the temporary buffer assumes the buffer is formatted as an array of bytes in RGBA order. However, the buffer is filled using a _mesa_texstore call with MESA_FORMAT_R8G8B8A8_UNORM format -- this is defined as an array of *integers* holding the RGBA values in packed format (least-significant to most-significant). This means incorrect bytes are accessed on big-endian systems. This patch fixes this by using the MESA_FORMAT_A8B8G8R8_UNORM format instead on big-endian systems when filling the buffer. This fixes about 100 piglit test case failures on s390x for me. Signed-off-by: Ulrich Weigand <[email protected]> Tested-by: Oded Gabbay <[email protected]> Cc: "10.6" "11.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit bd016a2601a741799bc76734deae0cb9ebcb2b8f)
Diffstat (limited to 'src/mesa/x86')
0 files changed, 0 insertions, 0 deletions