Update to mesa 23.3.0

This commit is contained in:
José Expósito 2023-11-30 13:15:29 +01:00 committed by root
parent 2036297341
commit ced931ff6e
6 changed files with 11 additions and 209 deletions

1
.mesa.metadata Normal file
View File

@ -0,0 +1 @@
e14dd8542b35c3cd4d21fee3ec1aeb1f61e2bba4 mesa-23.3.0.tar.xz

View File

@ -1,77 +0,0 @@
From 6388896985da7495ad0968322491953894d29637 Mon Sep 17 00:00:00 2001
From: Faith Ekstrand <faith.ekstrand@collabora.com>
Date: Wed, 1 Nov 2023 15:38:35 -0500
Subject: [PATCH] nir: add deref follower builder for casts.
This fixes intel_clc builds with llvm 17 on gfx125_bvh_build_DFS_DFS
where it dies in the lower indirect derefs pass.
Co-authored-by: Dave Airlie <airlied@redhat.com>
Fixes: 4a4e1757381c ("nir: Support deref instructions in lower_var_copies")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25536>
---
src/compiler/nir/nir_builder.h | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h
index c9f3465406c..d2b5702d3c9 100644
--- a/src/compiler/nir/nir_builder.h
+++ b/src/compiler/nir/nir_builder.h
@@ -1483,9 +1483,12 @@ nir_build_deref_struct(nir_builder *build, nir_deref_instr *parent,
}
static inline nir_deref_instr *
-nir_build_deref_cast(nir_builder *build, nir_def *parent,
- nir_variable_mode modes, const struct glsl_type *type,
- unsigned ptr_stride)
+nir_build_deref_cast_with_alignment(nir_builder *build, nir_def *parent,
+ nir_variable_mode modes,
+ const struct glsl_type *type,
+ unsigned ptr_stride,
+ unsigned align_mul,
+ unsigned align_offset)
{
nir_deref_instr *deref =
nir_deref_instr_create(build->shader, nir_deref_type_cast);
@@ -1493,6 +1496,8 @@ nir_build_deref_cast(nir_builder *build, nir_def *parent,
deref->modes = modes;
deref->type = type;
deref->parent = nir_src_for_ssa(parent);
+ deref->cast.align_mul = align_mul;
+ deref->cast.align_offset = align_offset;
deref->cast.ptr_stride = ptr_stride;
nir_def_init(&deref->instr, &deref->def, parent->num_components,
@@ -1503,6 +1508,15 @@ nir_build_deref_cast(nir_builder *build, nir_def *parent,
return deref;
}
+static inline nir_deref_instr *
+nir_build_deref_cast(nir_builder *build, nir_def *parent,
+ nir_variable_mode modes, const struct glsl_type *type,
+ unsigned ptr_stride)
+{
+ return nir_build_deref_cast_with_alignment(build, parent, modes, type,
+ ptr_stride, 0, 0);
+}
+
static inline nir_deref_instr *
nir_alignment_deref_cast(nir_builder *build, nir_deref_instr *parent,
uint32_t align_mul, uint32_t align_offset)
@@ -1570,6 +1584,13 @@ nir_build_deref_follower(nir_builder *b, nir_deref_instr *parent,
return nir_build_deref_struct(b, parent, leader->strct.index);
+ case nir_deref_type_cast:
+ return nir_build_deref_cast_with_alignment(b, &parent->def,
+ leader->modes,
+ leader->type,
+ leader->cast.ptr_stride,
+ leader->cast.align_mul,
+ leader->cast.align_offset);
default:
unreachable("Invalid deref instruction type");
}
--
2.41.0

View File

@ -1,45 +0,0 @@
From 8927e2739b4997312785ea3972044348b9f3b0b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= <jexposit@redhat.com>
Date: Fri, 3 Nov 2023 14:15:06 +0100
Subject: [PATCH] zink: Fix crash on zink_create_screen error path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The `zink_internal_create_screen()` function can fail before
`screen->loader_lib` and/or `screen->instance` are initialized.
The `zink_destroy_screen()` doesn't check those cases and crashes.
The error was found by Fedora's CI. The back trace is available at [1].
[1] https://bodhi.fedoraproject.org/updates/FEDORA-2023-c39f82c465
Fixes: 0c2045553fe4 ("zink: use screen destructor for creation fails")
Signed-off-by: José Expósito <jexposit@redhat.com>
---
src/gallium/drivers/zink/zink_screen.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 74b575ed658..0edb8d5f35e 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -1520,10 +1520,14 @@ zink_destroy_screen(struct pipe_screen *pscreen)
if (screen->dev)
VKSCR(DestroyDevice)(screen->dev, NULL);
- VKSCR(DestroyInstance)(screen->instance, NULL);
+ if (screen->instance)
+ VKSCR(DestroyInstance)(screen->instance, NULL);
+
util_idalloc_mt_fini(&screen->buffer_ids);
- util_dl_close(screen->loader_lib);
+ if (screen->loader_lib)
+ util_dl_close(screen->loader_lib);
+
if (screen->drm_fd != -1)
close(screen->drm_fd);
--
2.41.0

View File

@ -1,80 +0,0 @@
From 2a71f06f2938678d89d5ed1372cda6a7b55d964d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= <jexposit@redhat.com>
Date: Thu, 16 Nov 2023 12:18:29 +0100
Subject: [PATCH] zink: allow software rendering only if selected
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In environments where 3D acceleration is not available, like in a VM,
the behavior before commit 8cd44b884387 ("egl: add automatic zink
fallback loading between hw and sw drivers") was to fallback to swrast.
This was the output of `eglinfo` in that situation:
$ eglinfo
[...]
Wayland platform:
EGL driver name: swrast
OpenGL core profile renderer: llvmpipe (LLVM 17.0.4, 256 bits)
However, after commit 8cd44b884387 ("egl: add automatic zink fallback
loading between hw and sw drivers") Zink support is tested before
falling back to swrast.
Since the system doesn't support 3D acceleration, Zink + software
rendering is used instead of swrast causing issues like the ones
described in #10146.
In this case, `eglinfo` prints:
$ eglinfo
[...]
Wayland platform:
EGL driver name: zink
OpenGL core profile renderer: zink Vulkan 1.3(llvmpipe (LLVM 17.0.4,
256 bits) (MESA_LLVMPIPE))
This patch ensures that Zink + software rendering is used only when the
user opts-in by setting `LIBGL_ALWAYS_SOFTWARE` or `D3D_ALWAYS_SOFTWARE`
and swrast is used otherwise.
After the patch, the output of `eglinfo` is identical to the one before
the regression:
$ eglinfo
[...]
Wayland platform:
EGL driver name: swrast
OpenGL core profile renderer: llvmpipe (LLVM 17.0.4, 256 bits)
Resolves: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10146
Fixes: 8cd44b884387 ("egl: add automatic zink fallback loading between
hw and sw drivers")
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26220>
---
src/gallium/drivers/zink/zink_screen.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 29a377acfb6..50168d8daa1 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -1632,6 +1632,12 @@ choose_pdev(struct zink_screen *screen, int64_t dev_major, int64_t dev_minor)
}
VKSCR(GetPhysicalDeviceProperties)(screen->pdev, &screen->info.props);
+ /* allow software rendering only if forced by the user */
+ if (!cpu && screen->info.props.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU) {
+ screen->pdev = VK_NULL_HANDLE;
+ return;
+ }
+
screen->info.device_version = screen->info.props.apiVersion;
/* runtime version is the lesser of the instance version and device version */
--
2.41.0

View File

@ -52,9 +52,9 @@
Name: mesa
Summary: Mesa graphics libraries
%global ver 23.3.0-rc2
%global ver 23.3.0
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
Release: 3%{?dist}
Release: 1%{?dist}
License: MIT
URL: http://www.mesa3d.org
@ -66,10 +66,7 @@ Source1: Mesa-MLAA-License-Clarification-Email.txt
Patch10: gnome-shell-glthread-disable.patch
Patch12: radeonsi-turn-off-glthread.patch
Patch13: 0001-nir-add-deref-follower-builder-for-casts.patch
Patch14: 0001-zink-Fix-crash-on-zink_create_screen-error-path.patch
Patch15: 0001-zink-allow-software-rendering-only-if-selected.patch
Patch16: 0001-zink-initialize-drm_fd-to-1.patch
Patch13: 0001-zink-initialize-drm_fd-to-1.patch
BuildRequires: meson >= 0.45
BuildRequires: gcc
@ -356,6 +353,9 @@ cp %{SOURCE1} docs/
-Dlibunwind=disabled \
-Dlmsensors=disabled \
-Dandroid-libbacktrace=disabled \
%ifarch %{ix86}
-Dglx-read-only-text=true \
%endif
%{nil}
%meson_build
@ -610,6 +610,9 @@ popd
%endif
%changelog
* Thu Nov 30 2023 José Expósito <jexposit@redhat.com> - 23.3.0-1
- Update to mesa 23.3.0
* Wed Nov 22 2023 José Expósito <jexposit@redhat.com> - 23.3.0-rc2-3
- Backport MR #26332 to fix X11 session on VMs

View File

@ -1 +1 @@
SHA512 (mesa-23.3.0-rc2.tar.xz) = bebb27bcc860ef85b9f17001e00d83bdd4e6172c5ac7bdd3dd143814abe8e3b9443cea436db1df580834609f80ebdb46a01f3c66c141042a80f59434b5fd85aa
SHA512 (mesa-23.3.0.tar.xz) = 3568b571974a2c6c0c3a4cc614c851729962e39926f0af906ba91604f9d43c0618db7df004cbec5d9e5dbade2d6bde818608c9aa1686183994d68ad3e6ac4521