Update to 24.0.5

This commit is contained in:
José Expósito 2024-04-11 11:27:29 +02:00
parent 1604f1b352
commit 9c49b0842d
4 changed files with 2 additions and 136 deletions

View file

@ -1,40 +0,0 @@
From f4a3905c37c0e299fb3bd48120e46e1f7817c90e Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov@redhat.com>
Date: Mon, 11 Mar 2024 14:45:41 +0100
Subject: [PATCH] Pass no-verify-fixpoint option to instcombine in LLVM 18
When LLVM 18 is used, pass the no-verify-fixpoint option when
running the instcombine pass. Otherwise LLVM may abort with an
error.
The background here is that this option is enabled by default for
testing purposes, because instcombine is normally only explicitly
invoked like this inside tests. If it is used in an actual
production pipeline, the no-verify-fixpoint option needs to be
enabled.
This should fix the issue reported at
https://bugzilla.redhat.com/show_bug.cgi?id=2268800.
---
src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index cd2108f3a08..1345d85b224 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -609,7 +609,11 @@ gallivm_compile_module(struct gallivm_state *gallivm)
LLVMRunPasses(gallivm->module, passes, LLVMGetExecutionEngineTargetMachine(gallivm->engine), opts);
if (!(gallivm_perf & GALLIVM_PERF_NO_OPT))
+#if LLVM_VERSION_MAJOR >= 18
+ strcpy(passes, "sroa,early-cse,simplifycfg,reassociate,mem2reg,instsimplify,instcombine<no-verify-fixpoint>");
+#else
strcpy(passes, "sroa,early-cse,simplifycfg,reassociate,mem2reg,instsimplify,instcombine");
+#endif
else
strcpy(passes, "mem2reg");
--
2.43.0

View file

@ -1,84 +0,0 @@
From 4204fc291b6d78507efc3a1ea6ebe3e2065de03c Mon Sep 17 00:00:00 2001
From: Iago Toral Quiroga <itoral@igalia.com>
Date: Wed, 27 Mar 2024 11:02:12 +0100
Subject: [PATCH] v3d: fix GFXH-930 workaround
When we are reading any builtins like VertexID or InstanceID
the hw requires the first attribute to be active. In the
coordinate shader, however, it may have been DCEd, so we need
to detect that case and program a dummy attribute in that
scenario.
Fixes missing window decorations with GTK4+.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10853
---
src/broadcom/compiler/nir_to_vir.c | 17 +++++++++++++++--
src/gallium/drivers/v3d/v3dx_draw.c | 12 +++++++++++-
2 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c
index 265654625017c..f0309935ccc6d 100644
--- a/src/broadcom/compiler/nir_to_vir.c
+++ b/src/broadcom/compiler/nir_to_vir.c
@@ -2745,8 +2745,21 @@ ntq_emit_load_input(struct v3d_compile *c, nir_intrinsic_instr *instr)
SYSTEM_VALUE_VERTEX_ID)) {
index++;
}
- for (int i = 0; i < offset; i++)
- index += c->vattr_sizes[i];
+
+ for (int i = 0; i < offset; i++) {
+ /* GFXH-930: if any builtins (vid, iid, etc) are read then
+ * attribute 0 must be active (size > 0). When we hit this,
+ * the driver is expected to program attribute 0 to have a
+ * size of 1, so here we need to add that.
+ */
+ if (i == 0 && c->vs_key->is_coord &&
+ c->vattr_sizes[i] == 0 && index > 0) {
+ index++;
+ } else {
+ index += c->vattr_sizes[i];
+ }
+ }
+
index += nir_intrinsic_component(instr);
for (int i = 0; i < instr->num_components; i++) {
struct qreg vpm_offset = vir_uniform_ui(c, index++);
diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c
index 8fb99f735ab0f..163b7a037e6f1 100644
--- a/src/gallium/drivers/v3d/v3dx_draw.c
+++ b/src/gallium/drivers/v3d/v3dx_draw.c
@@ -709,6 +709,9 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,
}
bool cs_loaded_any = false;
+ const bool cs_uses_builtins = v3d->prog.cs->prog_data.vs->uses_iid ||
+ v3d->prog.cs->prog_data.vs->uses_biid ||
+ v3d->prog.cs->prog_data.vs->uses_vid;
for (int i = 0; i < vtx->num_elements; i++) {
struct pipe_vertex_element *elem = &vtx->pipe[i];
struct pipe_vertex_buffer *vb =
@@ -738,11 +741,18 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,
* inputs. (Since CS is just dead-code-elimination
* compared to VS, we can't have CS loading but not
* VS).
+ *
+ * Also, if any builtins are loaded, then we always
+ * need the first attribute to be enabled.
*/
if (v3d->prog.cs->prog_data.vs->vattr_sizes[i])
cs_loaded_any = true;
- if (i == vtx->num_elements - 1 && !cs_loaded_any) {
+ if (i == 0 && cs_uses_builtins && !cs_loaded_any) {
+ attr.number_of_values_read_by_coordinate_shader = 1;
+ cs_loaded_any = true;
+ } else if (i == vtx->num_elements - 1 && !cs_loaded_any) {
attr.number_of_values_read_by_coordinate_shader = 1;
+ cs_loaded_any = true;
}
attr.maximum_index = 0xffffff;
}
--
GitLab

View file

@ -62,7 +62,7 @@
Name: mesa
Summary: Mesa graphics libraries
%global ver 24.0.4
%global ver 24.0.5
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
Release: %autorelease
License: MIT AND BSD-3-Clause AND SGI-B-2.0
@ -76,16 +76,6 @@ Source1: Mesa-MLAA-License-Clarification-Email.txt
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
# Fix broken rendering with new GTK4 renderer on Raspberry Pi
# https://bugzilla.redhat.com/show_bug.cgi?id=2269412
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/10853
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28414
Patch22: 28414.patch
BuildRequires: meson >= 1.3.0
BuildRequires: gcc
BuildRequires: gcc-c++

View file

@ -1 +1 @@
SHA512 (mesa-24.0.4.tar.xz) = 1d05b07026417fbe9cf18f7b18f2db9fe5fe327555c590283d87f69bbdd51f64135928a1dbe155d750187fc268bbdbb070bc1ae9ffc3e013b8707b391969d515
SHA512 (mesa-24.0.5.tar.xz) = 9476af4b9ac8db5dce397084ef169927d10b28adea7e74aa5b3136810b499ac98ddf7ab564e7d1ff81c887208c8ebab3ad2d4e27e7f46136609b5c67527018eb