diff --git a/0001-winsys-radeon-pass-priv-instead-NULL-to-radeon_bo_ca.patch b/0001-winsys-radeon-pass-priv-instead-NULL-to-radeon_bo_ca.patch new file mode 100644 index 0000000..a2e0283 --- /dev/null +++ b/0001-winsys-radeon-pass-priv-instead-NULL-to-radeon_bo_ca.patch @@ -0,0 +1,35 @@ +From 99017891cad55972c26c0ca8354f48e722b37a66 Mon Sep 17 00:00:00 2001 +From: Pierre-Eric Pelloux-Prayer +Date: Mon, 18 Mar 2024 11:52:50 +0100 +Subject: [PATCH] winsys/radeon: pass priv instead NULL to + radeon_bo_can_reclaim +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This fixes a NULL pointer issue. + +Fixes: 4a078e693e9 ("r300,r600,radeon/winsys: always pass the winsys to radeon_bo_reference") +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10613 +Reviewed-by: Marek Olšák +Part-of: +--- + src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +index 2e1d9c488e2..7979cad75fa 100644 +--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c ++++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +@@ -729,7 +729,7 @@ bool radeon_bo_can_reclaim_slab(void *priv, struct pb_slab_entry *entry) + { + struct radeon_bo *bo = container_of(entry, struct radeon_bo, u.slab.entry); + +- return radeon_bo_can_reclaim(NULL, &bo->base); ++ return radeon_bo_can_reclaim(priv, &bo->base); + } + + static void radeon_bo_slab_destroy(void *winsys, struct pb_buffer_lean *_buf) +-- +2.44.0 + diff --git a/mesa.spec b/mesa.spec index 02b8ee4..6d2f6a7 100644 --- a/mesa.spec +++ b/mesa.spec @@ -79,6 +79,7 @@ Patch10: gnome-shell-glthread-disable.patch # Backport of https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28101 # to fix LLVM 18 compatibility (https://bugzilla.redhat.com/show_bug.cgi?id=2268800). Patch20: 0001-Pass-no-verify-fixpoint-option-to-instcombine-in-LLV.patch +Patch21: 0001-winsys-radeon-pass-priv-instead-NULL-to-radeon_bo_ca.patch BuildRequires: meson >= 1.3.0 BuildRequires: gcc