fix(mesa): libOSMesa is obsolete (#4763) (#4799)

* fix: Obsolete libOSMesa, add compat package

* feat: A lil thank you

* feat: Epoch on compat package so both are the same



* Update mesa.spec

---------


(cherry picked from commit 68ca317303)

Signed-off-by: Gilver <rockgrub@disroot.org>
Signed-off-by: RockGrub <RockGrub@users.noreply.github.com>
This commit is contained in:
Gilver
2025-05-13 04:00:50 -05:00
committed by GitHub
parent c6dcb0ab85
commit 0dd8199cfb
9 changed files with 760 additions and 178 deletions
@@ -0,0 +1,117 @@
Subject: RE: Question about Mesa MLAA license
From: Jorge Jimenez <iryoku@gmail.com>
Date: 01/08/2013 12:50 PM
To: Tom Callaway <tcallawa@redhat.com>
CC: "jorge@iryoku.com" <jorge@iryoku.com>
Yes to both questions.
Thanks,
Jorge
From: Tom Callaway <tcallawa@redhat.com>
Sent: January 8, 2013 6:49 PM
To: Jorge Jimenez <iryoku@gmail.com>
CC: jorge@iryoku.com
Subject: Re: Question about Mesa MLAA license
On 01/08/2013 12:39 PM, Jorge Jimenez wrote:
> Hi Tom,
>
> What we meant with that is that we made an exception for clause 2.
> Instead of clause 2, in the case of the Mesa project, you have to name
> the technique Jimenez's MLAA in the config options of Mesa. We did that
> just to allow them to solve license issues. This exception should be for
> the Mesa project, and any project using Mesa, like Fedora.
>
> We want to widespread usage of our MLAA, so we want to avoid any kind of
> license complications. Hope current one is good for Fedora, if not
> please tell, and we'll see what we can do!
Okay, a few more questions:
* If Fedora decides to simply reproduce the quoted statement:
"Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia,
Jose I. Echevarria, Fernando Navarro and Diego Gutierrez."
Specifically, if this is done as part of documentation included with
Mesa, is that sufficient to meet clause 2 even if the Mesa config option
is not set as described in your exception?
* Currently, the Mesa config option for MLAA says: "Morphological
anti-aliasing based on Jimenez\' MLAA. 0 to disable, 8 for default
quality". Is this in compliance with your exception?
Thanks again,
~tom
==
Fedora Project
Subject: RE: Question about Mesa MLAA license
From: Jorge Jimenez <iryoku@gmail.com>
Date: 01/08/2013 12:39 PM
To: "jorge@iryoku.com" <jorge@iryoku.com>, Tom Callaway <tcallawa@redhat.com>
Hi Tom,
What we meant with that is that we made an exception for clause 2.
Instead of clause 2, in the case of the Mesa project, you have to name
the technique Jimenez's MLAA in the config options of Mesa. We did that
just to allow them to solve license issues. This exception should be for
the Mesa project, and any project using Mesa, like Fedora.
We want to widespread usage of our MLAA, so we want to avoid any kind of
license complications. Hope current one is good for Fedora, if not
please tell, and we'll see what we can do!
Cheers,
Jorge
From: Tom Callaway <tcallawa@redhat.com>
Sent: January 8, 2013 6:30 PM
To: jorge@iryoku.com
Subject: Question about Mesa MLAA license
Jorge,
Thanks for all of your fantastic graphics work! I have been auditing
Fedora (a popular distribution of Linux) for license compliance and I
came across your MLAA code in Mesa.
The license says:
* 2. Redistributions in binary form must reproduce the following
statement:
*
* "Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia,
* Jose I. Echevarria, Fernando Navarro and Diego Gutierrez."
*
* Only for use in the Mesa project, this point 2 is filled by naming the
* technique Jimenez's MLAA in the Mesa config options.
That wording is unclear. When you say "Only for use in the Mesa
project...", it seems like you could either be saying:
- This code may only be used as part of Mesa.
OR
- In Mesa, you can comply with clause 2 by simply selecting "Jimenez's
MLAA" in the Mesa config options.
*****
If the first item is true, then we may have to remove the MLAA code from
Fedora's copy of Mesa. However, looking at the license on your SMAA
code, I do not believe it to be the case. Please let me know either way!
Thanks in advance,
Tom Callaway
Fedora Legal
==
Fedora Project
+10
View File
@@ -0,0 +1,10 @@
project pkg {
arches = ["x86_64", "aarch64", "i386"]
rpm {
spec = "mesa-compat.spec"
}
labels {
mock = 1
subrepo = "mesa"
}
}
+329
View File
@@ -0,0 +1,329 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Antheas Kapenekakis <git@antheas.dev>
Date: Sat, 15 Mar 2025 16:39:08 +0100
Subject: [BEGIN] SteamOS Changes
--
2.49.0
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Date: Fri, 14 Jan 2022 15:58:45 +0100
Subject: STEAMOS: radv: min image count override for FH5
Otherwise in combination with the vblank time reservation in
gamescope the game could get stuck in low power states.
---
src/util/00-radv-defaults.conf | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/util/00-radv-defaults.conf b/src/util/00-radv-defaults.conf
index 72f3438b39d..02d7ada7ad9 100644
--- a/src/util/00-radv-defaults.conf
+++ b/src/util/00-radv-defaults.conf
@@ -221,5 +221,9 @@ Application bugs worked around in this file:
<application name="Total War: WARHAMMER III" application_name_match="TotalWarhammer3">
<option name="radv_disable_depth_storage" value="true"/>
</application>
+
+ <application name="Forza Horizon 5" application_name_match="ForzaHorizon5.exe">
+ <option name="vk_x11_override_min_image_count" value="4" />
+ </application>
</device>
</driconf>
--
2.49.0
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Date: Thu, 22 Feb 2024 22:32:45 +0100
Subject: STEAMOS: Dynamic swapchain override for gamescope limiter for DRI3
only
The original patch (from Bas) contained WSI VK support too but it's
been removed because the Gamescope WSI layer already handles that.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
---
.../frontends/dri/loader_dri3_helper.c | 42 ++++++++++++++++++-
.../frontends/dri/loader_dri3_helper.h | 1 +
2 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/src/gallium/frontends/dri/loader_dri3_helper.c b/src/gallium/frontends/dri/loader_dri3_helper.c
index 9e4ca3f5707..7863623f8de 100644
--- a/src/gallium/frontends/dri/loader_dri3_helper.c
+++ b/src/gallium/frontends/dri/loader_dri3_helper.c
@@ -297,6 +297,30 @@ dri3_update_max_num_back(struct loader_dri3_drawable *draw)
}
}
+static unsigned
+gamescope_swapchain_override()
+{
+ const char *path = getenv("GAMESCOPE_LIMITER_FILE");
+ if (!path)
+ return 0;
+
+ static simple_mtx_t mtx = SIMPLE_MTX_INITIALIZER;
+ static int fd = -1;
+
+ simple_mtx_lock(&mtx);
+ if (fd < 0) {
+ fd = open(path, O_RDONLY);
+ }
+ simple_mtx_unlock(&mtx);
+
+ if (fd < 0)
+ return 0;
+
+ uint32_t override_value = 0;
+ pread(fd, &override_value, sizeof(override_value), 0);
+ return override_value;
+}
+
void
loader_dri3_set_swap_interval(struct loader_dri3_drawable *draw, int interval)
{
@@ -311,10 +335,12 @@ loader_dri3_set_swap_interval(struct loader_dri3_drawable *draw, int interval)
* PS. changing from value A to B and A < B won't cause swap out of order but
* may still gets wrong target_msc value at the beginning.
*/
- if (draw->swap_interval != interval)
+ if (draw->orig_swap_interval != interval)
loader_dri3_swapbuffer_barrier(draw);
- draw->swap_interval = interval;
+ draw->orig_swap_interval = interval;
+ if (gamescope_swapchain_override() != 1)
+ draw->swap_interval = interval;
}
static void
@@ -443,6 +469,12 @@ loader_dri3_drawable_init(xcb_connection_t *conn,
draw->swap_interval = dri_get_initial_swap_interval(draw->dri_screen_render_gpu);
+ draw->orig_swap_interval = draw->swap_interval;
+
+ unsigned gamescope_override = gamescope_swapchain_override();
+ if (gamescope_override == 1)
+ draw->swap_interval = 1;
+
dri3_update_max_num_back(draw);
/* Create a new drawable */
@@ -1087,6 +1119,12 @@ loader_dri3_swap_buffers_msc(struct loader_dri3_drawable *draw,
if (draw->type == LOADER_DRI3_DRAWABLE_WINDOW) {
dri3_fence_reset(draw->conn, back);
+ unsigned gamescope_override = gamescope_swapchain_override();
+ if (gamescope_override == 1)
+ draw->swap_interval = 1;
+ else
+ draw->swap_interval = draw->orig_swap_interval;
+
/* Compute when we want the frame shown by taking the last known
* successful MSC and adding in a swap interval for each outstanding swap
* request. target_msc=divisor=remainder=0 means "Use glXSwapBuffers()
diff --git a/src/gallium/frontends/dri/loader_dri3_helper.h b/src/gallium/frontends/dri/loader_dri3_helper.h
index 9061e9755e2..6cc64be298a 100644
--- a/src/gallium/frontends/dri/loader_dri3_helper.h
+++ b/src/gallium/frontends/dri/loader_dri3_helper.h
@@ -170,6 +170,7 @@ struct loader_dri3_drawable {
bool block_on_depleted_buffers;
bool queries_buffer_age;
int swap_interval;
+ int orig_swap_interval;
const struct loader_dri3_vtable *vtable;
--
2.49.0
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Date: Mon, 24 Feb 2025 17:48:21 +0100
Subject: radv: stop computing the UUID using the physical device cache key
Otherwise, the UUID changes for games that have shader-based drirc
workarounds and this breaks precompiled shaders on SteamDeck.
Instead, use this pdev cache key to compute the logical device hash
which is common to all pipelines.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
---
src/amd/vulkan/radv_device.c | 6 +++++-
src/amd/vulkan/radv_physical_device.c | 1 -
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 2de839e5d6d..da732ae503e 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -858,6 +858,7 @@ radv_device_init_cache_key(struct radv_device *device)
const struct radv_physical_device *pdev = radv_device_physical(device);
const struct radv_instance *instance = radv_physical_device_instance(pdev);
struct radv_device_cache_key *key = &device->cache_key;
+ struct mesa_blake3 ctx;
key->keep_shader_info = device->keep_shader_info;
key->trap_excp_flags = device->trap_handler_shader && instance->trap_excp_flags;
@@ -879,7 +880,10 @@ radv_device_init_cache_key(struct radv_device *device)
key->primitives_generated_query = true;
}
- _mesa_blake3_compute(key, sizeof(*key), device->cache_hash);
+ _mesa_blake3_init(&ctx);
+ _mesa_blake3_update(&ctx, &pdev->cache_key, sizeof(pdev->cache_key));
+ _mesa_blake3_update(&ctx, &device->cache_key, sizeof(device->cache_key));
+ _mesa_blake3_final(&ctx, device->cache_hash);
}
static void
diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c
index 0d3660e7064..826c23a6c46 100644
--- a/src/amd/vulkan/radv_physical_device.c
+++ b/src/amd/vulkan/radv_physical_device.c
@@ -206,7 +206,6 @@ radv_device_get_cache_uuid(struct radv_physical_device *pdev, void *uuid)
return -1;
#endif
- _mesa_sha1_update(&ctx, &pdev->cache_key, sizeof(pdev->cache_key));
_mesa_sha1_final(&ctx, sha1);
memcpy(uuid, sha1, VK_UUID_SIZE);
--
2.49.0
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Antheas Kapenekakis <git@antheas.dev>
Date: Sat, 15 Mar 2025 16:39:25 +0100
Subject: [BEGIN] SteamOS Backports
--
2.49.0
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Natalie Vock <natalie.vock@gmx.de>
Date: Fri, 28 Feb 2025 14:21:57 +0100
Subject: 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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33818>
---
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 5a23dc99cc4..1421688d580 100644
--- a/src/amd/vulkan/radv_pipeline_rt.c
+++ b/src/amd/vulkan/radv_pipeline_rt.c
@@ -600,7 +600,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;
--
2.49.0
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Antheas Kapenekakis <git@antheas.dev>
Date: Sat, 15 Mar 2025 16:39:33 +0100
Subject: [BEGIN] Our Mesa backports
--
2.49.0
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Maarten Lankhorst <maarten.lankhorst@intel.com>
Date: Mon, 17 Feb 2025 14:55:29 -0800
Subject: anv: Mark images with format modifiers set as scanout.
We currently use the presence of struct WSI_IMAGE_CREATE_INFO_MESA.scanout to mark the BO as scanout,
but this only handles the linear case, and fails when drm format modifiers are used.
Also handle the case of exportable BO with tiling set to VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT.
This fixes the gamescope handling of using vulkan allocated images for scanout.
Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12633
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev>
Normalspeak: fixes battlemage iGPUs in gamescope
---
src/intel/vulkan/anv_device.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 1884932bbc7..cbc1b4aad87 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1533,6 +1533,9 @@ VkResult anv_AllocateMemory(
dedicated_info->image != VK_NULL_HANDLE) {
ANV_FROM_HANDLE(anv_image, image, dedicated_info->image);
+ if (image->vk.tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)
+ alloc_flags |= ANV_BO_ALLOC_SCANOUT;
+
/* Apply implicit sync to be compatible with clients relying on
* implicit fencing. This matches the behavior in iris i915_batch
* submit. An example client is VA-API (iHD), so only dedicated
--
2.49.0
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Antheas Kapenekakis <git@antheas.dev>
Date: Mon, 24 Mar 2025 19:50:51 +0100
Subject: Revert "winsys/amdgpu: use VM_ALWAYS_VALID for all VRAM and GTT
allocations"
This reverts commit 8c91624614c1f939974fe0d2d1a3baf83335cecb.
Messes with AutoVRAM, who would have thought?
---
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
index 24ba28827f8..46461f8ee59 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
@@ -618,11 +618,6 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *aws,
if (flags & RADEON_FLAG_GTT_WC)
request.flags |= AMDGPU_GEM_CREATE_CPU_GTT_USWC;
- if (aws->info.has_local_buffers &&
- initial_domain & (RADEON_DOMAIN_VRAM_GTT | RADEON_DOMAIN_DOORBELL) &&
- flags & RADEON_FLAG_NO_INTERPROCESS_SHARING)
- request.flags |= AMDGPU_GEM_CREATE_VM_ALWAYS_VALID;
-
if (flags & RADEON_FLAG_DISCARDABLE &&
aws->info.drm_minor >= 47)
request.flags |= AMDGPU_GEM_CREATE_DISCARDABLE;
--
2.49.0
+126
View File
@@ -0,0 +1,126 @@
# Credit to LionHeartP from Nobara for most of the spec and letting me know about the need for this package <3
%global origname mesa
%global ver 25.0.4
Name: %{origname}-compat
Summary: Mesa graphics libraries - legacy compatibility libraries
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
Release: 1%{?dist}
Epoch: 1
License: MIT AND BSD-3-Clause AND SGI-B-2.0
URL: http://www.mesa3d.org
Source0: https://archive.mesa3d.org/mesa-%{ver}.tar.xz
# src/gallium/auxiliary/postprocess/pp_mlaa* have an ... interestingly worded license.
# Source1 contains email correspondence clarifying the license terms.
# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD.
Source1: Mesa-MLAA-License-Clarification-Email.txt
# Keep Mesa builds relatively the same
Patch0: bazzite.patch
BuildRequires: meson >= 1.3.0
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gettext
%if 0%{?with_hardware}
BuildRequires: kernel-headers
%endif
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(zlib) >= 1.2.3
BuildRequires: pkgconfig(libzstd)
BuildRequires: bison
BuildRequires: flex
BuildRequires: pkgconfig(libelf)
BuildRequires: llvm-devel >= 7.0.0
BuildRequires: libdrm-devel
BuildRequires: python3-devel
BuildRequires: python3-mako
BuildRequires: python3-pycparser
BuildRequires: python3-pyyaml
%description
%{summary}.
%package libOSMesa
Summary: Mesa offscreen rendering libraries
Provides: libOSMesa
Provides: libOSMesa%{?_isa}
# New things should not rely on this as this library is dead upstream
Provides: deprecated()
%description libOSMesa
%{summary}.
%package libOSMesa-devel
Summary: Mesa offscreen rendering development package
Requires: %{name}-libOSMesa%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
# New things should not rely on this as this library is dead upstream
Provides: deprecated()
%description libOSMesa-devel
%{summary}.
%prep
%autosetup -n %{origname}-%{ver} -p1
cp %{SOURCE1} docs/
%build
# We've gotten a report that enabling LTO for mesa breaks some games. See
# https://bugzilla.redhat.com/show_bug.cgi?id=1862771 for details.
# Disable LTO for now
%define _lto_cflags %{nil}
%meson \
-Dplatforms= \
-Dosmesa=true \
-Dgallium-drivers=llvmpipe \
-Dgallium-vdpau=disabled \
-Dgallium-va=disabled \
-Dgallium-xa=disabled \
-Dgallium-nine=false \
-Dgallium-opencl=disabled \
-Dgallium-rusticl=false \
-Dvulkan-drivers= \
-Dshared-glapi=enabled \
-Dgles1=disabled \
-Dgles2=disabled \
-Dopengl=true \
-Dgbm=disabled \
-Dglvnd=disabled \
-Dglx=disabled \
-Degl=disabled \
-Dllvm=enabled \
-Dshared-llvm=enabled \
-Dvalgrind=disabled \
-Dbuild-tests=false \
-Dmesa-clc=auto \
-Dmicrosoft-clc=disabled \
-Dxlib-lease=disabled \
-Dandroid-libbacktrace=disabled \
-Dlibunwind=disabled \
-Dlmsensors=disabled \
%ifarch %{ix86}
-Dglx-read-only-text=true \
%endif
%{nil}
%meson_build
%install
%meson_install
# trim some garbage, the mesa base package handles these
rm -rf %{buildroot}%{_datadir}/drirc.d
rm -rf %{buildroot}%{_includedir}/GL/gl*.h
rm -rf %{buildroot}%{_includedir}/KHR
%files libOSMesa
%{_libdir}/libOSMesa.so.8*
%files libOSMesa-devel
%dir %{_includedir}/GL
%{_includedir}/GL/osmesa.h
%{_libdir}/libOSMesa.so
%{_libdir}/pkgconfig/osmesa.pc
%changelog
* Thu Apr 24 2025 Neal Gompa <ngompa@fedoraproject.org> - 25.0.4-1
- Initial split from mesa for compat libraries (rhbz#2362203)
@@ -0,0 +1,32 @@
From 24f85c06c28736b73c14208a0ffa6657d2aee9cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= <jexposit@redhat.com>
Date: Mon, 21 Apr 2025 13:52:14 +0200
Subject: [PATCH] Revert "kopper: Explicitly choose zink"
On QEMU (virtio driver), without 3D acceleration enabled and without
mesa-vulkan-drivers installed, this commit prevents Mutter to start.
This reverts commit c0bc957c5d8c7edd57626284b712dd6ea1e375fc.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2360851
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13009
---
src/gallium/frontends/dri/kopper.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c
index a1d7dcb79b4..3bdb56022a9 100644
--- a/src/gallium/frontends/dri/kopper.c
+++ b/src/gallium/frontends/dri/kopper.c
@@ -73,7 +73,7 @@ kopper_init_screen(struct dri_screen *screen, bool driver_name_is_inferred)
bool success;
#ifdef HAVE_LIBDRM
if (screen->fd != -1)
- success = pipe_loader_drm_probe_fd(&screen->dev, screen->fd, true);
+ success = pipe_loader_drm_probe_fd(&screen->dev, screen->fd, false);
else
success = pipe_loader_vk_probe_dri(&screen->dev);
#else
--
2.49.0
+91 -106
View File
@@ -1,7 +1,16 @@
From eab8a4f9ad407b8c5c29123855a56b3698399be3 Mon Sep 17 00:00:00 2001
From aac6b04f39717f7363071f5500a89bb33e01cb33 Mon Sep 17 00:00:00 2001
From: Antheas Kapenekakis <git@antheas.dev>
Date: Sat, 15 Mar 2025 16:39:08 +0100
Subject: [PATCH 1/9] [BEGIN] SteamOS Changes
--
2.49.0
From 9fc35e8c53fe7e6c84b7da9ddff3d528f22ea4a9 Mon Sep 17 00:00:00 2001
From: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Date: Fri, 14 Jan 2022 15:58:45 +0100
Subject: [PATCH 1/7] STEAMOS: radv: min image count override for FH5
Subject: [PATCH 2/9] STEAMOS: radv: min image count override for FH5
Otherwise in combination with the vblank time reservation in
gamescope the game could get stuck in low power states.
@@ -10,10 +19,10 @@ gamescope the game could get stuck in low power states.
1 file changed, 4 insertions(+)
diff --git a/src/util/00-radv-defaults.conf b/src/util/00-radv-defaults.conf
index 72f3438b39d..02d7ada7ad9 100644
index aef8b9006cd..2a6b0ec84a4 100644
--- a/src/util/00-radv-defaults.conf
+++ b/src/util/00-radv-defaults.conf
@@ -221,5 +221,9 @@ Application bugs worked around in this file:
@@ -223,5 +223,9 @@ Application bugs worked around in this file:
<application name="Total War: WARHAMMER III" application_name_match="TotalWarhammer3">
<option name="radv_disable_depth_storage" value="true"/>
</application>
@@ -27,10 +36,10 @@ index 72f3438b39d..02d7ada7ad9 100644
2.49.0
From fd1d96636308b7216f246634cb75a20e45a3bd1b Mon Sep 17 00:00:00 2001
From 09299a2cf516078ce9ed9786a49ea6f957ac6527 Mon Sep 17 00:00:00 2001
From: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Date: Thu, 22 Feb 2024 22:32:45 +0100
Subject: [PATCH 2/7] STEAMOS: Dynamic swapchain override for gamescope limiter
Subject: [PATCH 3/9] STEAMOS: Dynamic swapchain override for gamescope limiter
for DRI3 only
The original patch (from Bas) contained WSI VK support too but it's
@@ -43,7 +52,7 @@ Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/src/gallium/frontends/dri/loader_dri3_helper.c b/src/gallium/frontends/dri/loader_dri3_helper.c
index 9e4ca3f5707..7863623f8de 100644
index 37970f4fa33..f200f2063a2 100644
--- a/src/gallium/frontends/dri/loader_dri3_helper.c
+++ b/src/gallium/frontends/dri/loader_dri3_helper.c
@@ -297,6 +297,30 @@ dri3_update_max_num_back(struct loader_dri3_drawable *draw)
@@ -105,7 +114,7 @@ index 9e4ca3f5707..7863623f8de 100644
dri3_update_max_num_back(draw);
/* Create a new drawable */
@@ -1087,6 +1119,12 @@ loader_dri3_swap_buffers_msc(struct loader_dri3_drawable *draw,
@@ -1085,6 +1117,12 @@ loader_dri3_swap_buffers_msc(struct loader_dri3_drawable *draw,
if (draw->type == LOADER_DRI3_DRAWABLE_WINDOW) {
dri3_fence_reset(draw->conn, back);
@@ -119,7 +128,7 @@ index 9e4ca3f5707..7863623f8de 100644
* successful MSC and adding in a swap interval for each outstanding swap
* request. target_msc=divisor=remainder=0 means "Use glXSwapBuffers()
diff --git a/src/gallium/frontends/dri/loader_dri3_helper.h b/src/gallium/frontends/dri/loader_dri3_helper.h
index 9061e9755e2..6cc64be298a 100644
index 4da19d73090..819a0e548fc 100644
--- a/src/gallium/frontends/dri/loader_dri3_helper.h
+++ b/src/gallium/frontends/dri/loader_dri3_helper.h
@@ -170,6 +170,7 @@ struct loader_dri3_drawable {
@@ -134,125 +143,59 @@ index 9061e9755e2..6cc64be298a 100644
2.49.0
From d2fe7734d135f785d4ac164c8fce779553f3ed19 Mon Sep 17 00:00:00 2001
From: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Date: Mon, 24 Feb 2025 17:48:21 +0100
Subject: [PATCH 3/7] radv: stop computing the UUID using the physical device
cache key
From d89154279b50afa429848b84624530f9e8771853 Mon Sep 17 00:00:00 2001
From: Kyle Gospodnetich <me@kylegospodneti.ch>
Date: Sun, 11 May 2025 13:30:57 -0700
Subject: [PATCH 4/9] STEAMOS: Fixes for DOOM: The Dark Ages
Otherwise, the UUID changes for games that have shader-based drirc
workarounds and this breaks precompiled shaders on SteamDeck.
Instead, use this pdev cache key to compute the logical device hash
which is common to all pipelines.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
---
src/amd/vulkan/radv_device.c | 6 +++++-
src/amd/vulkan/radv_physical_device.c | 1 -
2 files changed, 5 insertions(+), 2 deletions(-)
src/util/00-radv-defaults.conf | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 2de839e5d6d..da732ae503e 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -858,6 +858,7 @@ radv_device_init_cache_key(struct radv_device *device)
const struct radv_physical_device *pdev = radv_device_physical(device);
const struct radv_instance *instance = radv_physical_device_instance(pdev);
struct radv_device_cache_key *key = &device->cache_key;
+ struct mesa_blake3 ctx;
diff --git a/src/util/00-radv-defaults.conf b/src/util/00-radv-defaults.conf
index 2a6b0ec84a4..b28d9215b59 100644
--- a/src/util/00-radv-defaults.conf
+++ b/src/util/00-radv-defaults.conf
@@ -123,6 +123,13 @@ Application bugs worked around in this file:
<option name="radv_invariant_geom" value="true" />
</application>
key->keep_shader_info = device->keep_shader_info;
key->trap_excp_flags = device->trap_handler_shader && instance->trap_excp_flags;
@@ -879,7 +880,10 @@ radv_device_init_cache_key(struct radv_device *device)
key->primitives_generated_query = true;
}
- _mesa_blake3_compute(key, sizeof(*key), device->cache_hash);
+ _mesa_blake3_init(&ctx);
+ _mesa_blake3_update(&ctx, &pdev->cache_key, sizeof(pdev->cache_key));
+ _mesa_blake3_update(&ctx, &device->cache_key, sizeof(device->cache_key));
+ _mesa_blake3_final(&ctx, device->cache_hash);
}
static void
diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c
index 0d3660e7064..826c23a6c46 100644
--- a/src/amd/vulkan/radv_physical_device.c
+++ b/src/amd/vulkan/radv_physical_device.c
@@ -206,7 +206,6 @@ radv_device_get_cache_uuid(struct radv_physical_device *pdev, void *uuid)
return -1;
#endif
- _mesa_sha1_update(&ctx, &pdev->cache_key, sizeof(pdev->cache_key));
_mesa_sha1_final(&ctx, sha1);
memcpy(uuid, sha1, VK_UUID_SIZE);
+ <application name="DOOM: The Dark Ages" application_name_match="DOOMTheDarkAges">
+ <option name="radv_force_64k_sparse_alignment" value="true" />
+ <option name="radv_zero_vram" value="true" />
+ <option name="radv_legacy_sparse_binding" value="true" />
+ <option name="radv_disable_dcc_stores" value="true" />
+ </application>
+
<application name="Wolfenstein II" application_name_match="Wolfenstein II The New Colossus">
<option name="radv_disable_dcc" value="true" />
</application>
--
2.49.0
From b6b22ad82dcc2dc47b089a7ac018757809fa1a1c Mon Sep 17 00:00:00 2001
From 614a06238ee1219c1dd2bbcb5cca6b3ab4bc574c Mon Sep 17 00:00:00 2001
From: Antheas Kapenekakis <git@antheas.dev>
Date: Sat, 15 Mar 2025 16:39:25 +0100
Subject: [PATCH 4/7] [BEGIN] SteamOS Backports
Subject: [PATCH 5/9] [BEGIN] SteamOS Backports
--
2.49.0
From 03830a554fe5e0a49c710e1c4b3b14f117325e5c Mon Sep 17 00:00:00 2001
From: Natalie Vock <natalie.vock@gmx.de>
Date: Fri, 28 Feb 2025 14:21:57 +0100
Subject: [PATCH 5/7] 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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33818>
---
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 5a23dc99cc4..1421688d580 100644
--- a/src/amd/vulkan/radv_pipeline_rt.c
+++ b/src/amd/vulkan/radv_pipeline_rt.c
@@ -600,7 +600,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;
--
2.49.0
From b013419f74e43edfe1da225b9641dea132d5897a Mon Sep 17 00:00:00 2001
From 5177e8134f047f38d2fe1e0f3608323d02db3cc2 Mon Sep 17 00:00:00 2001
From: Antheas Kapenekakis <git@antheas.dev>
Date: Sat, 15 Mar 2025 16:39:33 +0100
Subject: [PATCH 6/7] [BEGIN] Our Mesa backports
Subject: [PATCH 6/9] [BEGIN] Our Mesa backports
--
2.49.0
From b45f046a4ebbbb1894e945a4cc2457674d9bf5ba Mon Sep 17 00:00:00 2001
From 045d4757aaf29dcb8ed4d81f575e331a017317ed Mon Sep 17 00:00:00 2001
From: Maarten Lankhorst <maarten.lankhorst@intel.com>
Date: Mon, 17 Feb 2025 14:55:29 -0800
Subject: [PATCH 7/7] anv: Mark images with format modifiers set as scanout.
Subject: [PATCH 7/9] anv: Mark images with format modifiers set as scanout.
We currently use the presence of struct WSI_IMAGE_CREATE_INFO_MESA.scanout to mark the BO as scanout,
but this only handles the linear case, and fails when drm format modifiers are used.
@@ -270,10 +213,10 @@ Normalspeak: fixes battlemage iGPUs in gamescope
1 file changed, 3 insertions(+)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 1884932bbc7..cbc1b4aad87 100644
index 0fb86e9d846..de37994d324 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1533,6 +1533,9 @@ VkResult anv_AllocateMemory(
@@ -1566,6 +1566,9 @@ VkResult anv_AllocateMemory(
dedicated_info->image != VK_NULL_HANDLE) {
ANV_FROM_HANDLE(anv_image, image, dedicated_info->image);
@@ -286,3 +229,45 @@ index 1884932bbc7..cbc1b4aad87 100644
--
2.49.0
From d08d3f395ecfa666763f7a8dac0543c52325294c Mon Sep 17 00:00:00 2001
From: Antheas Kapenekakis <git@antheas.dev>
Date: Mon, 24 Mar 2025 19:50:51 +0100
Subject: [PATCH 8/9] Revert "winsys/amdgpu: use VM_ALWAYS_VALID for all VRAM
and GTT allocations"
This reverts commit 8c91624614c1f939974fe0d2d1a3baf83335cecb.
Messes with AutoVRAM, who would have thought?
---
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
index dfefc468bca..cc0719a1898 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
@@ -618,11 +618,6 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *aws,
if (flags & RADEON_FLAG_GTT_WC)
request.flags |= AMDGPU_GEM_CREATE_CPU_GTT_USWC;
- if (aws->info.has_local_buffers &&
- initial_domain & (RADEON_DOMAIN_VRAM_GTT | RADEON_DOMAIN_DOORBELL) &&
- flags & RADEON_FLAG_NO_INTERPROCESS_SHARING)
- request.flags |= AMDGPU_GEM_CREATE_VM_ALWAYS_VALID;
-
if (flags & RADEON_FLAG_DISCARDABLE &&
aws->info.drm_minor >= 47)
request.flags |= AMDGPU_GEM_CREATE_DISCARDABLE;
--
2.49.0
From 54cf223f100a114680f51f43f5dfc632eeeefb3b Mon Sep 17 00:00:00 2001
From: Antheas Kapenekakis <git@antheas.dev>
Date: Wed, 7 May 2025 18:50:48 +0200
Subject: [PATCH 9/9] [BEGIN] Intel DX12 fix
--
2.49.0
-30
View File
@@ -1,30 +0,0 @@
From 80ac865565c8b2cbdf9cca953a234cb630549802 Mon Sep 17 00:00:00 2001
From: Atapi <34801996+Sterophonick@users.noreply.github.com>
Date: Sat, 10 May 2025 20:07:43 -0600
Subject: [PATCH] util: import doom changes from SteamOS
---
src/util/00-radv-defaults.conf | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/util/00-radv-defaults.conf b/src/util/00-radv-defaults.conf
index aef8b9006cd..3bb0f3451a4 100644
--- a/src/util/00-radv-defaults.conf
+++ b/src/util/00-radv-defaults.conf
@@ -123,6 +123,13 @@ Application bugs worked around in this file:
<option name="radv_invariant_geom" value="true" />
</application>
+ <application name="DOOM: The Dark Ages" application_name_match="DOOMTheDarkAges">
+ <option name="radv_force_64k_sparse_alignment" value="true" />
+ <option name="radv_zero_vram" value="true" />
+ <option name="radv_legacy_sparse_binding" value="true" />
+ <option name="radv_disable_dcc_stores" value="true" />
+ </application>
+
<application name="Wolfenstein II" application_name_match="Wolfenstein II The New Colossus">
<option name="radv_disable_dcc" value="true" />
</application>
--
2.49.0
@@ -0,0 +1,11 @@
diff -up mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf.dma mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf
--- mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf.dma 2022-11-25 10:32:32.175879868 +1000
+++ mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf 2022-11-25 10:32:43.743067470 +1000
@@ -653,6 +653,7 @@ TODO: document the other workarounds.
<application name="gnome-shell" executable="gnome-shell">
<option name="adaptive_sync" value="false" />
<option name="v3d_nonmsaa_texture_size_limit" value="true" />
+ <option name="mesa_glthread" value="false"/>
</application>
<application name="Desktop — Plasma" executable="plasmashell">
<option name="adaptive_sync" value="false" />
+44 -42
View File
@@ -48,11 +48,15 @@
%global with_vc4 1
%global with_etnaviv 1
%global with_tegra 1
%global with_asahi 1
%endif
%global with_freedreno 1
%global with_panfrost 1
%global with_v3d 1
%global with_xa 1
%if 0%{?with_asahi}
%global asahi_platform_vulkan %{?with_vulkan_hw:,asahi}%{!?with_vulkan_hw:%{nil}}
%endif
%global extra_platform_vulkan %{?with_vulkan_hw:,broadcom,freedreno,panfrost,imagination-experimental}%{!?with_vulkan_hw:%{nil}}
%endif
@@ -67,31 +71,35 @@
%bcond_with valgrind
%endif
%global vulkan_drivers swrast,virtio%{?base_vulkan}%{?intel_platform_vulkan}%{?extra_platform_vulkan}%{?with_nvk:,nouveau}
%global vulkan_drivers swrast,virtio%{?base_vulkan}%{?intel_platform_vulkan}%{?asahi_platform_vulkan}%{?extra_platform_vulkan}%{?with_nvk:,nouveau}
Name: %{srcname}
Summary: Mesa graphics libraries
# Make the dep solver always prefer our Mesa over the distro's
# This should not break anything by default as the Mesa stream is ***EXPLICITLY***
# disabled by default, and has to be enabled manually. See `terra/release/terra-mesa.repo` for details.
Epoch: 1
Version: 25.0.2
Version: 25.1.0
Release: 1%?dist
License: MIT AND BSD-3-Clause AND SGI-B-2.0
URL: http://www.mesa3d.org
Source0: https://archive.mesa3d.org/%{srcname}-%{version}.tar.xz
# src/gallium/auxiliary/postprocess/pp_mlaa* have an ... interestingly worded license.
# Source1 contains email correspondence clarifying the license terms.
# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD.
Source1: Mesa-MLAA-License-Clarification-Email.txt
Patch10: gnome-shell-glthread-disable.patch
# https://github.com/bazzite-org/mesa
Patch20: bazzite.patch
# temporary: DOOM: The Dark Ages patches from SteamOS
Patch21: doom-dta.patch
# This patch makes Fedora CI fail and causes issues in QEMU. Revert it until
# we find a fix.
# https://bugzilla.redhat.com/show_bug.cgi?id=2360851
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/13009
Patch30: 0001-Revert-kopper-Explicitly-choose-zink.patch
BuildRequires: meson >= 1.3.0
BuildRequires: gcc
@@ -153,7 +161,7 @@ BuildRequires: flatbuffers-devel
BuildRequires: flatbuffers-compiler
BuildRequires: xtensor-devel
%endif
%if 0%{?with_opencl} || 0%{?with_nvk} || 0%{?with_intel_clc}
%if 0%{?with_opencl} || 0%{?with_nvk} || 0%{?with_intel_clc} || 0%{?with_asahi} || 0%{?with_panfrost}
BuildRequires: clang-devel
BuildRequires: pkgconfig(libclc)
BuildRequires: pkgconfig(SPIRV-Tools)
@@ -201,18 +209,20 @@ Obsoletes: mesa-omx-drivers < %{?epoch:%{epoch}:}%{version}-%{release}
%package libGL
Summary: Mesa libGL runtime libraries
Requires: libglvnd-glx%{?_isa} >= 1:1.3.2
Recommends: %{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: %{name}-libOSMesa < %{?epoch:%{epoch}:}25.1.0~rc2-1
%description libGL
%{summary}.
%package libGL-devel
Summary: Mesa libGL development package
Requires: %{name}-libGL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: (%{name}-libGL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} if %{name}-libGL%{?_isa})
Requires: libglvnd-devel%{?_isa} >= 1:1.3.2
Provides: libGL-devel
Provides: libGL-devel%{?_isa}
Recommends: gl-manpages
Obsoletes: %{name}-libOSMesa-devel < %{?epoch:%{epoch}:}25.1.0~rc2-1
%description libGL-devel
%{summary}.
@@ -221,14 +231,14 @@ Recommends: gl-manpages
Summary: Mesa libEGL runtime libraries
Requires: libglvnd-egl%{?_isa} >= 1:1.3.2
Requires: %{name}-libgbm%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Recommends: %{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description libEGL
%{summary}.
%package libEGL-devel
Summary: Mesa libEGL development package
Requires: %{name}-libEGL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: (%{name}-libEGL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} if %{name}-libEGL%{?_isa})
Requires: libglvnd-devel%{?_isa} >= 1:1.3.2
Requires: %{name}-khr-devel%{?_isa}
Provides: libEGL-devel
@@ -243,7 +253,7 @@ Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{rel
%if 0%{?with_va}
Recommends: %{name}-va-drivers%{?_isa}
%endif
Obsoletes: %{name}-libglapi < 1:25.0.0~rc2-1
Obsoletes: %{name}-libglapi < %{?epoch:%{epoch}:}25.0.0~rc2-1
%description dri-drivers
%{summary}.
@@ -252,7 +262,7 @@ Obsoletes: %{name}-libglapi < 1:25.0.0~rc2-1
%package va-drivers
Summary: Mesa-based VA-API video acceleration drivers
Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: %{name}-vaapi-drivers < 1:22.2.0-5
Obsoletes: %{name}-vaapi-drivers < %{?epoch:%{epoch}:}22.2.0-5
%description va-drivers
%{summary}.
@@ -267,21 +277,6 @@ Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{rel
%{summary}.
%endif
%package libOSMesa
Summary: Mesa offscreen rendering libraries
Provides: libOSMesa
Provides: libOSMesa%{?_isa}
%description libOSMesa
%{summary}.
%package libOSMesa-devel
Summary: Mesa offscreen rendering development package
Requires: %{name}-libOSMesa%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description libOSMesa-devel
%{summary}.
%package libgbm
Summary: Mesa gbm runtime library
Provides: libgbm
@@ -326,7 +321,7 @@ Provides: libxatracker-devel%{?_isa}
%if 0%{?with_opencl}
%package libOpenCL
Summary: Mesa OpenCL runtime library
Requires: ocl-icd%{?_isa}
Requires: (ocl-icd%{?_isa} or OpenCL-ICD-Loader%{?_isa})
Requires: libclc%{?_isa}
Requires: %{name}-libgbm%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: opencl-filesystem
@@ -404,9 +399,9 @@ export MESON_PACKAGE_CACHE_DIR="%{cargo_registry}/"
-Dplatforms=x11,wayland \
-Dosmesa=true \
%if 0%{?with_hardware}
-Dgallium-drivers=swrast,virgl,nouveau%{?with_r300:,r300}%{?with_crocus:,crocus}%{?with_i915:,i915}%{?with_iris:,iris}%{?with_vmware:,svga}%{?with_radeonsi:,radeonsi}%{?with_r600:,r600}%{?with_freedreno:,freedreno}%{?with_etnaviv:,etnaviv}%{?with_tegra:,tegra}%{?with_vc4:,vc4}%{?with_v3d:,v3d}%{?with_lima:,lima}%{?with_panfrost:,panfrost}%{?with_vulkan_hw:,zink} \
-Dgallium-drivers=llvmpipe,virgl,nouveau%{?with_r300:,r300}%{?with_crocus:,crocus}%{?with_i915:,i915}%{?with_iris:,iris}%{?with_vmware:,svga}%{?with_radeonsi:,radeonsi}%{?with_r600:,r600}%{?with_asahi:,asahi}%{?with_freedreno:,freedreno}%{?with_etnaviv:,etnaviv}%{?with_tegra:,tegra}%{?with_vc4:,vc4}%{?with_v3d:,v3d}%{?with_lima:,lima}%{?with_panfrost:,panfrost}%{?with_vulkan_hw:,zink} \
%else
-Dgallium-drivers=swrast,virgl \
-Dgallium-drivers=llvmpipe,virgl \
%endif
-Dgallium-vdpau=%{?with_vdpau:enabled}%{!?with_vdpau:disabled} \
-Dgallium-va=%{?with_va:enabled}%{!?with_va:disabled} \
@@ -462,13 +457,19 @@ rm -vf %{buildroot}%{_libdir}/libEGL_mesa.so
# XXX can we just not build this
rm -vf %{buildroot}%{_libdir}/libGLES*
%if ! 0%{?with_asahi}
# This symlink is unconditionally created when any kmsro driver is enabled
# We don't want this one so delete it
rm -vf %{buildroot}%{_libdir}/dri/apple_dri.so
%endif
# glvnd needs a default provider for indirect rendering where it cannot
# determine the vendor
ln -s %{_libdir}/libGLX_mesa.so.0 %{buildroot}%{_libdir}/libGLX_system.so.0
# this keeps breaking, check it early. note that the exit from eu-ftr is odd.
pushd %{buildroot}%{_libdir}
for i in libOSMesa*.so libGL.so ; do
for i in libGL.so ; do
eu-findtextrel $i && exit 1
done
popd
@@ -495,21 +496,13 @@ popd
%{_includedir}/EGL/eglext_angle.h
%{_includedir}/EGL/eglmesaext.h
%files libOSMesa
%{_libdir}/libOSMesa.so.8*
%files libOSMesa-devel
%dir %{_includedir}/GL
%{_includedir}/GL/osmesa.h
%{_libdir}/libOSMesa.so
%{_libdir}/pkgconfig/osmesa.pc
%files libgbm
%{_libdir}/gbm/dri_gbm.so
%{_libdir}/libgbm.so.1
%{_libdir}/libgbm.so.1.*
%files libgbm-devel
%{_libdir}/libgbm.so
%{_includedir}/gbm.h
%{_includedir}/gbm_backend_abi.h
%{_libdir}/pkgconfig/gbm.pc
%if 0%{?with_xa}
@@ -560,6 +553,7 @@ popd
%files dri-drivers
%{_datadir}/drirc.d/00-mesa-defaults.conf
%{_libdir}/libgallium-*.so
%{_libdir}/gbm/dri_gbm.so
%{_libdir}/dri/kms_swrast_dri.so
%{_libdir}/dri/libdril_dri.so
%{_libdir}/dri/swrast_dri.so
@@ -581,6 +575,10 @@ popd
%{_libdir}/dri/iris_dri.so
%endif
%ifarch aarch64 x86_64 %{ix86}
%if 0%{?with_asahi}
%{_libdir}/dri/apple_dri.so
%{_libdir}/dri/asahi_dri.so
%endif
%{_libdir}/dri/ingenic-drm_dri.so
%{_libdir}/dri/imx-drm_dri.so
%{_libdir}/dri/imx-lcdif_dri.so
@@ -703,6 +701,10 @@ popd
%{_datadir}/vulkan/icd.d/intel_hasvk_icd.*.json
%endif
%ifarch aarch64 x86_64 %{ix86}
%if 0%{?with_asahi}
%{_libdir}/libvulkan_asahi.so
%{_datadir}/vulkan/icd.d/asahi_icd.*.json
%endif
%{_libdir}/libvulkan_broadcom.so
%{_datadir}/vulkan/icd.d/broadcom_icd.*.json
%{_libdir}/libvulkan_freedreno.so
@@ -714,6 +716,6 @@ popd
%{_datadir}/vulkan/icd.d/powervr_mesa_icd.*.json
%endif
%endif
%changelog
%autochangelog