aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriadne Conill <ariadne@dereferenced.org>2020-08-14 19:04:40 -0600
committerAriadne Conill <ariadne@dereferenced.org>2020-08-14 19:06:46 -0600
commit74ab74e97390b5624baca6536db9bc159388f2e7 (patch)
tree9edb11cc945be21a9824712e4717d8eca2bd2307
parent965560fbf64ebcc03958bd17f8e77e9aa7133a4a (diff)
downloadaports-74ab74e97390b5624baca6536db9bc159388f2e7.tar.gz
aports-74ab74e97390b5624baca6536db9bc159388f2e7.tar.bz2
aports-74ab74e97390b5624baca6536db9bc159388f2e7.tar.xz
main/mesa: force radeon buffers to be stored in GTT on aarch64
This works around some performance and graphics regressions caused by incompatibilities with ARM cache coherency and the AMD gpu driver, which causes Alpine to have graphics corruption when using X on Honeycomb and Huawei Kunping desktops.
-rw-r--r--main/mesa/0001-radeonsi-On-Aarch64-force-persistent-buffers-to-GTT.patch37
-rw-r--r--main/mesa/APKBUILD7
2 files changed, 42 insertions, 2 deletions
diff --git a/main/mesa/0001-radeonsi-On-Aarch64-force-persistent-buffers-to-GTT.patch b/main/mesa/0001-radeonsi-On-Aarch64-force-persistent-buffers-to-GTT.patch
new file mode 100644
index 0000000000..36c84c3f42
--- /dev/null
+++ b/main/mesa/0001-radeonsi-On-Aarch64-force-persistent-buffers-to-GTT.patch
@@ -0,0 +1,37 @@
+From d72aa8ae74ffb7329003f9f23ffa05833af951ab Mon Sep 17 00:00:00 2001
+From: Jon Nettleton <jon@solid-run.com>
+Date: Fri, 14 Aug 2020 13:36:08 +0200
+Subject: [PATCH] radeonsi: On Aarch64 force persistent buffers to GTT
+
+This fixes a glamore corruption issue on the HoneyComb and by
+internet reports should also fix problems seen on Huaweii
+Kunpeng hardware.
+
+The root cause of the corruption needs to be worked out, but
+this patch also adds a noticable performance improvement. The
+aquarium webgl demo under chromium increases from 39-49 FPS
+when 5000 fish being rendered is selected. Glmark scores also
+improve by ~200 with no specific tests showing any regression.
+
+Signed-off-by: Jon Nettleton <jon@solid-run.com>
+---
+ src/gallium/drivers/radeonsi/si_buffer.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/gallium/drivers/radeonsi/si_buffer.c b/src/gallium/drivers/radeonsi/si_buffer.c
+index 6b58aebee2d..c9e983367a0 100644
+--- a/src/gallium/drivers/radeonsi/si_buffer.c
++++ b/src/gallium/drivers/radeonsi/si_buffer.c
+@@ -151,6 +151,10 @@ void si_init_resource_fields(struct si_screen *sscreen, struct si_resource *res,
+ */
+ if (!sscreen->info.kernel_flushes_hdp_before_ib || !sscreen->info.is_amdgpu)
+ res->domains = RADEON_DOMAIN_GTT;
++
++#if defined(PIPE_ARCH_AARCH64)
++ res->domains = RADEON_DOMAIN_GTT;
++#endif
+ }
+
+ /* Tiled textures are unmappable. Always put them in VRAM. */
+--
+2.26.2
diff --git a/main/mesa/APKBUILD b/main/mesa/APKBUILD
index 3074fd6b41..fd67c8e8c4 100644
--- a/main/mesa/APKBUILD
+++ b/main/mesa/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mesa
pkgver=20.1.5
-pkgrel=0
+pkgrel=1
pkgdesc="Mesa DRI OpenGL library"
url="https://www.mesa3d.org"
arch="all"
@@ -64,8 +64,10 @@ source="
musl-fix-includes.patch
add-use-elf-tls.patch
disable-rgb10-by-default.patch
+ 0001-radeonsi-On-Aarch64-force-persistent-buffers-to-GTT.patch
"
replaces="mesa-dricore"
+options="!check" # we skip tests intentionally
if [ "$CARCH" = x86 ]; then
# Bug upstream that needs to be fixed
@@ -329,4 +331,5 @@ sha512sums="47796bf2cccfd054ff25f571747754e0ab9b42fe87644ea320b3d9497d63b3013e9b
cdf22d2da3328e116c379264886bd01fd3ad5cc45fe03dc6fd97bdc4794502598ee195c0b9d975fa264d6ac31c6fa108c0535c91800ecf4fcabfd308e53074cc adjust-cache-deflate-buffer.patch
cf849044d6cc7d2af4ff015208fb09d70bf9660538699797da21bda2ecb7c1892d312af83d05116afd826708d9caafb1d05a13f09139c558aea6fee931e3eee7 musl-fix-includes.patch
cd3961319079882e692176f654feb21ddfeccafcc7f4ce4f8d21160f36deda768eb3ee7f49dae2e18f0587d321473adc7f127a2d75ae143ec29168bcc0fe12c0 add-use-elf-tls.patch
-ede642ae9be64c3fc5fee46e8bf1b2f982191febcfadb235b0261868213c7cca11d38bb53b972f3184a887430f37b9f470a9b12fd03cf54b98315ec75c4d8ed4 disable-rgb10-by-default.patch"
+ede642ae9be64c3fc5fee46e8bf1b2f982191febcfadb235b0261868213c7cca11d38bb53b972f3184a887430f37b9f470a9b12fd03cf54b98315ec75c4d8ed4 disable-rgb10-by-default.patch
+018c1d18e9f9898351ef56a1f785f310b2570ee0d3c3e25c345ced4266e2e37bde7fd4403a4d60db493c3a69d9ad62ddbc325bfe74fd00244ed6ec056b533810 0001-radeonsi-On-Aarch64-force-persistent-buffers-to-GTT.patch"