From 51e0d22a07489fa3972340ae04d4695bac3265d4 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Oct 04 2025 18:11:01 +0000 Subject: [PATCH 1/6] Add udev requirement for hardware support --- diff --git a/mesa.spec b/mesa.spec index 65fc8c7..d35bf57 100644 --- a/mesa.spec +++ b/mesa.spec @@ -137,6 +137,7 @@ BuildRequires: gcc-c++ BuildRequires: gettext %if 0%{?with_hardware} BuildRequires: kernel-headers +BuildRequires: systemd-devel %endif # We only check for the minimum version of pkgconfig(libdrm) needed so that the # SRPMs for each arch still have the same build dependencies. See: From 35748288a6daf7d679ad6d23c680f2abe3a45b84 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Oct 04 2025 18:14:38 +0000 Subject: [PATCH 2/6] Drop removed intel_clc --- diff --git a/mesa.spec b/mesa.spec index d35bf57..7432041 100644 --- a/mesa.spec +++ b/mesa.spec @@ -59,7 +59,6 @@ %ifarch %{ix86} x86_64 %global with_crocus 1 %global with_iris 1 -%global with_intel_clc 1 %global intel_platform_vulkan %{?with_vulkan_hw:,intel,intel_hasvk}%{!?with_vulkan_hw:%{nil}} %if !0%{?rhel} %global with_i915 1 @@ -192,7 +191,7 @@ BuildRequires: flatbuffers-devel BuildRequires: flatbuffers-compiler BuildRequires: xtensor-devel %endif -%if 0%{?with_opencl} || 0%{?with_nvk} || 0%{?with_intel_clc} || 0%{?with_asahi} || 0%{?with_panfrost} +%if 0%{?with_opencl} || 0%{?with_nvk} || 0%{?with_asahi} || 0%{?with_panfrost} BuildRequires: clang-devel BuildRequires: pkgconfig(libclc) BuildRequires: pkgconfig(SPIRV-Tools) @@ -217,9 +216,6 @@ BuildRequires: pkgconfig(valgrind) %endif BuildRequires: python3-devel BuildRequires: python3-mako -%if 0%{?with_intel_clc} -BuildRequires: python3-ply -%endif BuildRequires: python3-pycparser BuildRequires: python3-pyyaml BuildRequires: vulkan-headers @@ -437,9 +433,6 @@ export MESON_PACKAGE_CACHE_DIR="%{cargo_registry}/" -Dglx=dri \ -Degl=enabled \ -Dglvnd=enabled \ -%if 0%{?with_intel_clc} - -Dintel-clc=enabled \ -%endif -Dintel-rt=%{?with_intel_vk_rt:enabled}%{!?with_intel_vk_rt:disabled} \ -Dmicrosoft-clc=disabled \ -Dllvm=enabled \ From 371bd860d5dd8f00448fe87ff610af967d287893 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Oct 04 2025 18:15:08 +0000 Subject: [PATCH 3/6] Drop removed selinux option --- diff --git a/mesa.spec b/mesa.spec index 7432041..a078799 100644 --- a/mesa.spec +++ b/mesa.spec @@ -148,7 +148,6 @@ BuildRequires: pkgconfig(libunwind) BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(zlib) >= 1.2.3 BuildRequires: pkgconfig(libzstd) -BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(wayland-scanner) BuildRequires: pkgconfig(wayland-protocols) >= 1.41 BuildRequires: pkgconfig(wayland-client) >= 1.11 @@ -439,7 +438,6 @@ export MESON_PACKAGE_CACHE_DIR="%{cargo_registry}/" -Dshared-llvm=enabled \ -Dvalgrind=%{?with_valgrind:enabled}%{!?with_valgrind:disabled} \ -Dbuild-tests=false \ - -Dselinux=true \ %if !0%{?with_libunwind} -Dlibunwind=disabled \ %endif From 8b8564f85de57e312d5f4158cdc99b64aeb527ae Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Oct 04 2025 18:15:59 +0000 Subject: [PATCH 4/6] Allow building on Fedora 43 and later Switching to the fedora built mesa does not work by not providing F43 builds. --- diff --git a/mesa.spec b/mesa.spec index a078799..a824550 100644 --- a/mesa.spec +++ b/mesa.spec @@ -1,6 +1,3 @@ -# prevent builds for Fedora 43 and later -%if 0%{?fedora} && 0%{?fedora} < 43 - %dnl optionally do a minimal asahi specific build %bcond asahi_minimal %["%{_arch}" != "aarch64"] @@ -798,8 +795,5 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/fex-emu/overlays/ mesa-%{_arch}.erof %doc docs/Mesa-MLAA-License-Clarification-Email.txt %endif -# end of the Fedora 43+ condition, changelog must stay outside of it -%endif - %changelog %autochangelog From f04011dc6ecb3871ff90822c677f27cb026702c1 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Oct 04 2025 18:44:58 +0000 Subject: [PATCH 5/6] Update to mesa 25.2.4 Use Releases starting from "0.100" so Fedora packages always win version copmparisons. --- diff --git a/mesa.spec b/mesa.spec index a824550..62580d4 100644 --- a/mesa.spec +++ b/mesa.spec @@ -106,9 +106,10 @@ Name: mesa Summary: Mesa graphics libraries -%global ver 25.2.1 +%global ver 25.2.4 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} -Release: 1%{?dist} +# Keep `Release` smaller than 1 so that the Fedora packages always win version comparisons +Release: 0.100%{?dist} License: MIT AND BSD-3-Clause AND SGI-B-2.0 URL: http://www.mesa3d.org diff --git a/sources b/sources index ab6dba0..fad49d1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mesa-25.2.1.tar.xz) = 913ee1d00e13bafb7275740ba0883cf949a42d45595ef5bab60038064cb27aff36285ac9105269be5c0e3b4320fc7b70ca5c5f28e2cf79457882baff7e10620b +SHA512 (mesa-25.2.4.tar.xz) = ec74e1cc101b68ad2462399554273a9debb3d93a05c0a315cde3259b250d5828cbcef7771049b52beb01d07c34122fa5257451409b1d2b7fdcbf055c0f2c863d From d8a7e09d849b88c1490fad5d84c3798cbe6a2662 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Oct 04 2025 18:51:07 +0000 Subject: [PATCH 6/6] Backport mesa merge request 37655 From https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37655 --- diff --git a/mesa.spec b/mesa.spec index 62580d4..a93c829 100644 --- a/mesa.spec +++ b/mesa.spec @@ -109,7 +109,7 @@ Summary: Mesa graphics libraries %global ver 25.2.4 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} # Keep `Release` smaller than 1 so that the Fedora packages always win version comparisons -Release: 0.100%{?dist} +Release: 0.101%{?dist} License: MIT AND BSD-3-Clause AND SGI-B-2.0 URL: http://www.mesa3d.org @@ -123,6 +123,7 @@ Patch10: gnome-shell-glthread-disable.patch Patch20: meson_1.5_rust_build.patch Patch21: do_not_use_wl_display_dispatch_queue_timeout.diff +Patch22: mr_37655_hk_host_cached.patch %if 0%{?fedora} && 0%{?fedora} < 42 BuildRequires: meson >= 1.5.0 diff --git a/mr_37655_hk_host_cached.patch b/mr_37655_hk_host_cached.patch new file mode 100644 index 0000000..09001a7 --- /dev/null +++ b/mr_37655_hk_host_cached.patch @@ -0,0 +1,60 @@ +From 05b927ac7e35db6ea8e661fda5415b1b0230a3c6 Mon Sep 17 00:00:00 2001 +From: TellowKrinkle +Date: Sun, 28 Sep 2025 19:50:25 +0200 +Subject: [PATCH 1/2] hk: Enable caching on memory marked with HOST_CACHED_BIT + +cc: mesa-stable + +Part-of: +--- + src/asahi/vulkan/hk_device_memory.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/asahi/vulkan/hk_device_memory.c b/src/asahi/vulkan/hk_device_memory.c +index 81566327e17b2..b91e2001999d4 100644 +--- a/src/asahi/vulkan/hk_device_memory.c ++++ b/src/asahi/vulkan/hk_device_memory.c +@@ -211,6 +211,8 @@ hk_AllocateMemory(VkDevice device, const VkMemoryAllocateInfo *pAllocateInfo, + enum agx_bo_flags flags = 0; + if (handle_types) + flags |= AGX_BO_SHAREABLE; ++ if (type->propertyFlags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) ++ flags |= AGX_BO_WRITEBACK; + + mem->bo = agx_bo_create(&dev->dev, aligned_size, 0, flags, "App memory"); + if (!mem->bo) { +-- +GitLab + + +From e14adc5cb27aca4e68bcc201c8549b27d7c8c94b Mon Sep 17 00:00:00 2001 +From: TellowKrinkle +Date: Sun, 28 Sep 2025 19:51:20 +0200 +Subject: [PATCH 2/2] hk: Add non-cached memory type + +Part-of: +--- + src/asahi/vulkan/hk_physical_device.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/asahi/vulkan/hk_physical_device.c b/src/asahi/vulkan/hk_physical_device.c +index 174de4398b049..a31b6fde5451e 100644 +--- a/src/asahi/vulkan/hk_physical_device.c ++++ b/src/asahi/vulkan/hk_physical_device.c +@@ -1261,6 +1261,13 @@ hk_create_drm_physical_device(struct vk_instance *_instance, + .heapIndex = sysmem_heap_idx, + }; + ++ pdev->mem_types[pdev->mem_type_count++] = (VkMemoryType){ ++ .propertyFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | ++ VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | ++ VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, ++ .heapIndex = sysmem_heap_idx, ++ }; ++ + assert(pdev->mem_heap_count <= ARRAY_SIZE(pdev->mem_heaps)); + assert(pdev->mem_type_count <= ARRAY_SIZE(pdev->mem_types)); + +-- +GitLab +