r600g: set endianess of 16/32-bit buffers according to do_endian_swap
authorOded Gabbay <oded.gabbay@gmail.com>
Tue, 19 Apr 2016 13:25:23 +0000 (16:25 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 26 Apr 2016 08:00:16 +0000 (11:00 +0300)
commit686ad477bdfc698b8ff7ccfba6225b2c1c68214a
tree3062a75e4262554bc668c27256eef865a48896ca
parent2242dbe11d56b05ede7a928a9973adda4b145ad7
r600g: set endianess of 16/32-bit buffers according to do_endian_swap

This patch modifies r600_colorformat_endian_swap(), so for 16-bit and for
32-bit buffers, the endianess configuration will be determined not only
by the color/texture format, but also by the do_endian_swap parameter.

The only exception is for array formats, which are always set to not do
swapping, because for them gallium sets an alias based on the machine's
endianess.

v4:
V_0280A0_COLOR_16_16 and V_0280A0_COLOR_16_16_FLOAT should be set to
8IN16 because the bytes inside need to be swapped even for array formats.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/r600/r600_state_common.c