From 39f3b17153c3df8a4ae2fd7d9527c39bd03b7e92 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Mon, 10 Mar 2025 23:36:21 -0700 Subject: [PATCH 1/3] feat(mesa): patches: two commit backports for game fixes (#3825) (#3868) Closes #3804 (cherry picked from commit 763fac09cb31b0d2f5d12c8fee5a64d5cc6d129e) Co-authored-by: madomado --- ...f9a972324a72dd507e09ac975b969e6c88e0.patch | 34 +++++++++++++++++ ...8799be3afe9a1e7ca9156a5d44ffe0aae681.patch | 38 +++++++++++++++++++ anda/lib/mesa/mesa.spec | 5 ++- 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 anda/lib/mesa/13a3f9a972324a72dd507e09ac975b969e6c88e0.patch create mode 100644 anda/lib/mesa/237d8799be3afe9a1e7ca9156a5d44ffe0aae681.patch diff --git a/anda/lib/mesa/13a3f9a972324a72dd507e09ac975b969e6c88e0.patch b/anda/lib/mesa/13a3f9a972324a72dd507e09ac975b969e6c88e0.patch new file mode 100644 index 0000000000..43b451f3d1 --- /dev/null +++ b/anda/lib/mesa/13a3f9a972324a72dd507e09ac975b969e6c88e0.patch @@ -0,0 +1,34 @@ +From 13a3f9a972324a72dd507e09ac975b969e6c88e0 Mon Sep 17 00:00:00 2001 +From: Hans-Kristian Arntzen +Date: Tue, 25 Feb 2025 12:43:17 +0100 +Subject: [PATCH] radv: Always set 0 dispatch offset for indirect CS. + +Fixes severe glitching in Avowed. + +Signed-off-by: Hans-Kristian Arntzen +Reviewed-by: Samuel Pitoiset +Reviewed-by: Natalie Vock +Cc: mesa-stable +Part-of: +--- + src/amd/vulkan/radv_cmd_buffer.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c +index d8c0c6810524b..d85c0659cb04e 100644 +--- a/src/amd/vulkan/radv_cmd_buffer.c ++++ b/src/amd/vulkan/radv_cmd_buffer.c +@@ -11722,6 +11722,10 @@ radv_emit_dispatch_packets(struct radv_cmd_buffer *cmd_buffer, const struct radv + dispatch_initiator |= S_00B800_USE_THREAD_DIMENSIONS(1); + } + ++ /* Indirect CS does not support offsets in the API. Must program this in case there have been ++ * preceding 1D RT dispatch or vkCmdDispatchBase. */ ++ dispatch_initiator |= S_00B800_FORCE_START_AT_000(1); ++ + if (grid_size_offset) { + if (device->load_grid_size_from_user_sgpr) { + assert(pdev->info.gfx_level >= GFX10_3); +-- +GitLab + diff --git a/anda/lib/mesa/237d8799be3afe9a1e7ca9156a5d44ffe0aae681.patch b/anda/lib/mesa/237d8799be3afe9a1e7ca9156a5d44ffe0aae681.patch new file mode 100644 index 0000000000..47151e7f03 --- /dev/null +++ b/anda/lib/mesa/237d8799be3afe9a1e7ca9156a5d44ffe0aae681.patch @@ -0,0 +1,38 @@ +From 237d8799be3afe9a1e7ca9156a5d44ffe0aae681 Mon Sep 17 00:00:00 2001 +From: Natalie Vock +Date: Fri, 28 Feb 2025 14:21:57 +0100 +Subject: [PATCH] radv/rt: Limit monolithic pipelines to 50 stages + +Beyond that, monolithic pipelines just bloat to incredible sizes, +destroying compile times for questionable, if any, runtime perf benefit. + +Indiana Jones: The Great Circle has more than 100 stages and takes +several minutes to compile its RT pipeline on Deck when using monolithic +compilation, and yet separate shaders still end up faster (probably +because instruction cache coherency in traversal is better). + +Part-of: +--- + src/amd/vulkan/radv_pipeline_rt.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/amd/vulkan/radv_pipeline_rt.c b/src/amd/vulkan/radv_pipeline_rt.c +index 0658840966c30..bcda4aae5528d 100644 +--- a/src/amd/vulkan/radv_pipeline_rt.c ++++ b/src/amd/vulkan/radv_pipeline_rt.c +@@ -602,7 +602,11 @@ radv_rt_compile_shaders(struct radv_device *device, struct vk_pipeline_cache *ca + + bool library = pipeline->base.base.create_flags & VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR; + +- bool monolithic = !library; ++ /* Beyond 50 shader stages, inlining everything bloats the shader a ton, increasing compile times and ++ * potentially even reducing runtime performance because of instruction cache coherency issues in the ++ * traversal loop. ++ */ ++ bool monolithic = !library && pipeline->stage_count < 50; + for (uint32_t i = 0; i < pCreateInfo->stageCount; i++) { + if (rt_stages[i].shader || rt_stages[i].nir) + continue; +-- +GitLab + diff --git a/anda/lib/mesa/mesa.spec b/anda/lib/mesa/mesa.spec index fb1860d1c7..0324d039f6 100644 --- a/anda/lib/mesa/mesa.spec +++ b/anda/lib/mesa/mesa.spec @@ -76,7 +76,7 @@ Summary: Mesa graphics libraries # disabled by default, and has to be enabled manually. See `terra/release/terra-mesa.repo` for details. Epoch: 1 Version: 25.0.1 -Release: 3%?dist +Release: 4%?dist License: MIT AND BSD-3-Clause AND SGI-B-2.0 URL: http://www.mesa3d.org @@ -99,6 +99,9 @@ Patch20: valve.patch # https://gitlab.freedesktop.org/mesa/mesa/-/issues/12633 Patch21: 12633.patch +Patch30: 237d8799be3afe9a1e7ca9156a5d44ffe0aae681.patch +Patch31: 13a3f9a972324a72dd507e09ac975b969e6c88e0.patch + # s390x: fix build #Patch100: https://src.fedoraproject.org/rpms/mesa/raw/e89544b7a4d811a64ca23b402add29524cc6f704/f/fix-egl-on-s390x.patch From 0f6555f9d24aaba019231ba09e4f6dd0d80c9778 Mon Sep 17 00:00:00 2001 From: Raboneko Date: Tue, 11 Mar 2025 06:44:50 +0000 Subject: [PATCH 2/3] bump(branch): akmod dkms akmod dkms akmod dkms --- anda/system/xone/akmod/xone-kmod.spec | 1 + anda/system/xone/dkms/dkms-xone.spec | 1 + anda/system/xpad-noone/akmod/xpad-noone-kmod.spec | 1 + anda/system/xpad-noone/dkms/dkms-xpad-noone.spec | 1 + anda/system/xpadneo/akmod/xpadneo-kmod.spec | 1 + anda/system/xpadneo/dkms/dkms-xpadneo.spec | 1 + 6 files changed, 6 insertions(+) diff --git a/anda/system/xone/akmod/xone-kmod.spec b/anda/system/xone/akmod/xone-kmod.spec index 2c5c9c6ee5..90a04d2b8b 100644 --- a/anda/system/xone/akmod/xone-kmod.spec +++ b/anda/system/xone/akmod/xone-kmod.spec @@ -2,6 +2,7 @@ %global commitdate 20241223 %global commitdate 20241223 %global commitdate 20241223 +%global commitdate 20241223 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commitdate 20241223 %global ver 0.3 diff --git a/anda/system/xone/dkms/dkms-xone.spec b/anda/system/xone/dkms/dkms-xone.spec index 30c1123c1b..83a29816d9 100644 --- a/anda/system/xone/dkms/dkms-xone.spec +++ b/anda/system/xone/dkms/dkms-xone.spec @@ -2,6 +2,7 @@ %global commitdate 20241223 %global commitdate 20241223 %global commitdate 20241223 +%global commitdate 20241223 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commitdate 20241223 %global ver 0.3 diff --git a/anda/system/xpad-noone/akmod/xpad-noone-kmod.spec b/anda/system/xpad-noone/akmod/xpad-noone-kmod.spec index 32ccfacbf7..29018fe6d2 100644 --- a/anda/system/xpad-noone/akmod/xpad-noone-kmod.spec +++ b/anda/system/xpad-noone/akmod/xpad-noone-kmod.spec @@ -2,6 +2,7 @@ %global commitdate 20240109 %global commitdate 20240109 %global commitdate 20240109 +%global commitdate 20240109 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commitdate 20240109 %global ver 1.0 diff --git a/anda/system/xpad-noone/dkms/dkms-xpad-noone.spec b/anda/system/xpad-noone/dkms/dkms-xpad-noone.spec index 32bbeaadb5..171a691593 100644 --- a/anda/system/xpad-noone/dkms/dkms-xpad-noone.spec +++ b/anda/system/xpad-noone/dkms/dkms-xpad-noone.spec @@ -2,6 +2,7 @@ %global commitdate 20240109 %global commitdate 20240109 %global commitdate 20240109 +%global commitdate 20240109 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commitdate 20240109 %global ver 1.0 diff --git a/anda/system/xpadneo/akmod/xpadneo-kmod.spec b/anda/system/xpadneo/akmod/xpadneo-kmod.spec index de5e2d598a..904b18d74b 100644 --- a/anda/system/xpadneo/akmod/xpadneo-kmod.spec +++ b/anda/system/xpadneo/akmod/xpadneo-kmod.spec @@ -2,6 +2,7 @@ %global commitdate 20241224 %global commitdate 20241224 %global commitdate 20241224 +%global commitdate 20241224 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commitdate 20241224 %global ver 0.9.7 diff --git a/anda/system/xpadneo/dkms/dkms-xpadneo.spec b/anda/system/xpadneo/dkms/dkms-xpadneo.spec index 48926a1694..2160c09ffc 100644 --- a/anda/system/xpadneo/dkms/dkms-xpadneo.spec +++ b/anda/system/xpadneo/dkms/dkms-xpadneo.spec @@ -2,6 +2,7 @@ %global commitdate 20241224 %global commitdate 20241224 %global commitdate 20241224 +%global commitdate 20241224 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commitdate 20241224 %global ver 0.9.7 From bdcd2054b06027243698dd46c628638b58bdd1e9 Mon Sep 17 00:00:00 2001 From: Raboneko Date: Tue, 11 Mar 2025 06:50:16 +0000 Subject: [PATCH 3/3] bump: opengamepadui --- anda/games/opengamepadui/opengamepadui.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anda/games/opengamepadui/opengamepadui.spec b/anda/games/opengamepadui/opengamepadui.spec index e29d8635f3..7c1075e7a2 100644 --- a/anda/games/opengamepadui/opengamepadui.spec +++ b/anda/games/opengamepadui/opengamepadui.spec @@ -1,5 +1,5 @@ Name: opengamepadui -Version: 0.35.8 +Version: 0.37.0 Release: 1%?dist Summary: Open source gamepad-native game launcher and overlay