diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-02-27 04:40:40 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-02-27 04:40:40 -0600 |
commit | b69f6a06f8698c72c30465dbfa1cc91334551b03 (patch) | |
tree | 6584de6349afc8c3cef8611ccb32601c996afa90 /user/mesa/big-endian-flipping.patch | |
parent | 0d1e21187a5e1c89f5d79e5a8623b2e678524b1d (diff) | |
download | packages-b69f6a06f8698c72c30465dbfa1cc91334551b03.tar.gz packages-b69f6a06f8698c72c30465dbfa1cc91334551b03.tar.bz2 packages-b69f6a06f8698c72c30465dbfa1cc91334551b03.tar.xz packages-b69f6a06f8698c72c30465dbfa1cc91334551b03.zip |
user/mesa: Fix behaviour on big endian systems
Diffstat (limited to 'user/mesa/big-endian-flipping.patch')
-rw-r--r-- | user/mesa/big-endian-flipping.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/user/mesa/big-endian-flipping.patch b/user/mesa/big-endian-flipping.patch new file mode 100644 index 000000000..154a83108 --- /dev/null +++ b/user/mesa/big-endian-flipping.patch @@ -0,0 +1,37 @@ +From f1e0d76264491a8d8f99a0041b1a36cf9752fd28 Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> +Date: Thu, 27 Feb 2020 04:24:52 -0600 +Subject: [PATCH] mesa: Support flipping three-channel formats + +Test system: POWER9 ppc64 (BE) system with a Radeon R5 230. + +Before this commit, starting Xorg caused this message: +Assertion failed: !"Invalid array format" (../src/mesa/main/formats.c: _mesa_array_format_flip_channels: 421) + +After this commit, Xorg starts successfully. +--- + src/mesa/main/formats.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c +index 370859d37ca..2e7d5d7f05e 100644 +--- a/src/mesa/main/formats.c ++++ b/src/mesa/main/formats.c +@@ -419,6 +419,14 @@ _mesa_array_format_flip_channels(mesa_array_format format) + return format; + } + ++ if (num_channels == 3) { ++ static const uint8_t flip[6] = { 2, 1, 0, 3, 4, 5 }; ++ _mesa_array_format_set_swizzle(&format, ++ flip[swizzle[0]], flip[swizzle[1]], ++ flip[swizzle[2]], flip[swizzle[3]]); ++ return format; ++ } ++ + if (num_channels == 4) { + static const uint8_t flip[6] = { 3, 2, 1, 0, 4, 5 }; + _mesa_array_format_set_swizzle(&format, +-- +2.25.1 + |