summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOded Gabbay <[email protected]>2016-02-25 23:09:18 +0200
committerEmil Velikov <[email protected]>2016-04-11 21:02:15 +0100
commit0f401ea5f69e8a6142b8d854bead0e3914832e1d (patch)
tree4696cf0fcaf9a562ad5556eaa2b596e58ec7d378 /src
parentc786f890cdf234c9113613e744f555274609e924 (diff)
gallium/r600: Don't let h/w do endian swap for colorformat
Since the rework on gallium pipe formats, there is no more need to do endian swap of the colorformat in the h/w, because the conversion between mesa format and gallium (pipe) format takes endianess into account (see the big #if in p_format.h). v2: return ENDIAN_NONE only for four 8-bits components (V_0280A0_COLOR_8_8_8_8) Signed-off-by: Oded Gabbay <[email protected]> Cc: "11.1 11.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (cherry picked from commit e3dfc0e095bba74aaaea4d6f994c29fdf954cbad)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index a3d198b0d18..cda719ad310 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -2517,6 +2517,13 @@ uint32_t r600_colorformat_endian_swap(uint32_t colorformat)
/* 32-bit buffers. */
case V_0280A0_COLOR_8_8_8_8:
+ /*
+ * No need to do endian swaps on four 8-bits components,
+ * as mesa<-->pipe formats conversion take into account
+ * the endianess
+ */
+ return ENDIAN_NONE;
+
case V_0280A0_COLOR_2_10_10_10:
case V_0280A0_COLOR_8_24:
case V_0280A0_COLOR_24_8: