From 5dabec2aa23e5553253cd0883a9615e53991a3b8 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 20 Sep 2020 20:19:55 +0200 Subject: [PATCH] mesa: update to 20.1.8, add aarch64 patch This workaround fixes xrender issues (corrupt rendering) with Radeon cards on some boards. Closes https://github.com/void-linux/void-packages/pull/24951 --- ...ch64-force-persistent-buffers-to-GTT.patch | 38 +++++++++++++++++++ srcpkgs/mesa/template | 4 +- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/mesa/patches/0001-radeonsi-On-Aarch64-force-persistent-buffers-to-GTT.patch diff --git a/srcpkgs/mesa/patches/0001-radeonsi-On-Aarch64-force-persistent-buffers-to-GTT.patch b/srcpkgs/mesa/patches/0001-radeonsi-On-Aarch64-force-persistent-buffers-to-GTT.patch new file mode 100644 index 00000000000..6130310380f --- /dev/null +++ b/srcpkgs/mesa/patches/0001-radeonsi-On-Aarch64-force-persistent-buffers-to-GTT.patch @@ -0,0 +1,38 @@ +From d72aa8ae74ffb7329003f9f23ffa05833af951ab Mon Sep 17 00:00:00 2001 +From: Jon Nettleton +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 +--- + 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 +--- src/gallium/drivers/radeonsi/si_buffer.c ++++ src/gallium/drivers/radeonsi/si_buffer.c +@@ -151,6 +151,11 @@ 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) ++ if (size <= 1024 * 512) ++ res->domains = RADEON_DOMAIN_GTT; ++#endif + } + + /* Tiled textures are unmappable. Always put them in VRAM. */ +-- +2.26.2 diff --git a/srcpkgs/mesa/template b/srcpkgs/mesa/template index d9e7219ecc0..217dc47827b 100644 --- a/srcpkgs/mesa/template +++ b/srcpkgs/mesa/template @@ -1,6 +1,6 @@ # Template file for 'mesa' pkgname=mesa -version=20.1.7 +version=20.1.8 revision=1 wrksrc="mesa-${version}" build_style=meson @@ -23,7 +23,7 @@ license="MIT, LGPL-2.1-or-later" homepage="https://www.mesa3d.org/" changelog="https://docs.mesa3d.org/relnotes/${version}.html" distfiles="https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz" -checksum=4de9dd0cb2ca367606cada421db62fbf6d276dfd533e522bfab6001ff9aba288 +checksum=df21351494f7caaec5a3ccc16f14f15512e98d2ecde178bba1d134edc899b961 build_options="wayland" build_options_default="wayland"