Update to mesa 23.3.0-rc2

Resolves: https://issues.redhat.com/browse/RHEL-1258
This commit is contained in:
José Expósito 2023-11-06 11:03:09 +01:00
parent 8729610266
commit 870f800acd
5 changed files with 131 additions and 3 deletions

View File

@ -0,0 +1,77 @@
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

@ -0,0 +1,45 @@
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

@ -52,7 +52,7 @@
Name: mesa
Summary: Mesa graphics libraries
%global ver 23.1.4
%global ver 23.3.0-rc2
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
Release: 1%{?dist}
License: MIT
@ -66,6 +66,8 @@ 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
BuildRequires: meson >= 0.45
BuildRequires: gcc
@ -540,6 +542,7 @@ popd
%if 0%{?with_kmsro}
%{_libdir}/dri/armada-drm_dri.so
%{_libdir}/dri/exynos_dri.so
%{_libdir}/dri/hdlcd_dri.so
%{_libdir}/dri/hx8357d_dri.so
%{_libdir}/dri/ili9225_dri.so
%{_libdir}/dri/ili9341_dri.so
@ -605,6 +608,9 @@ popd
%endif
%changelog
* Mon Nov 06 2023 José Expósito <jexposit@redhat.com> - 23.3.0-rc2-1
- Update to mesa 23.3.0-rc2
* Thu Jul 27 2023 Dave Airlie <airlied@redhat.com> - 23.1.4-1
- Update to mesa 23.1.4

View File

@ -5,7 +5,7 @@ diff -up mesa-22.3.3/src/gallium/drivers/radeonsi/driinfo_radeonsi.h.dma mesa-22
// DriConf options specific to radeonsi
DRI_CONF_SECTION_PERFORMANCE
DRI_CONF_ADAPTIVE_SYNC(true)
-DRI_CONF_MESA_GLTHREAD(true)
-DRI_CONF_MESA_GLTHREAD_DRIVER(true)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG

View File

@ -1 +1 @@
SHA512 (mesa-23.1.4.tar.xz) = 4063c7848f507b5e25cfc862394268147254b90c9f3eb19035cce338b0a9cb611b7380c1c73f0e4feeddde68124225df7dee7b9db5f019603dfde2b88ff46a21
SHA512 (mesa-23.3.0-rc2.tar.xz) = bebb27bcc860ef85b9f17001e00d83bdd4e6172c5ac7bdd3dd143814abe8e3b9443cea436db1df580834609f80ebdb46a01f3c66c141042a80f59434b5fd85aa