chore: Update to Mesa 23.3.3

This commit is contained in:
Kyle Gospodnetich 2024-01-13 14:32:59 -08:00
parent 414cce0b73
commit 69a0b62b04
6 changed files with 84 additions and 100 deletions

View File

@ -1,28 +0,0 @@
From b32d3c9251e18c77b4d58db61b43797ffb7b05cf Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Wed, 3 Jan 2024 16:31:23 +1000
Subject: [PATCH] intel/compiler: fix release build unused variable.
This is only used in an assert.
Fixes: 158ac265dfd0 ("intel/fs: Make helpers for saving/restoring instruction order")
---
src/intel/compiler/brw_fs.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 696b5db8d9d..aa01a2241ce 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -6834,7 +6834,7 @@ save_instruction_order(const struct cfg_t *cfg)
static void
restore_instruction_order(struct cfg_t *cfg, fs_inst **inst_arr)
{
- int num_insts = cfg->last_block()->end_ip + 1;
+ ASSERTED int num_insts = cfg->last_block()->end_ip + 1;
int ip = 0;
foreach_block (block, cfg) {
--
2.43.0

View File

@ -1,42 +0,0 @@
From 56a72e014fcda3c52cf119115cb71fce2fad86d8 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Thu, 21 Dec 2023 10:39:08 +1000
Subject: [PATCH] intel/compiler: reemit boolean resolve for inverted if on
gen5
Gen5 adds some boolean conversion instructions after nir emits,
but that nir srcs don't line up with them, so reemit the boolean
conversion if we reemit the inot.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 31b5f5a51f3a ("nir/opt_if: Simplify if's with general conditions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26782>
---
src/intel/compiler/brw_fs_nir.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index 33f2a4046b2..ccdd0fe7db8 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -422,6 +422,17 @@ fs_visitor::nir_emit_if(nir_if *if_stmt)
invert = true;
cond_reg = get_nir_src(cond->src[0].src);
cond_reg = offset(cond_reg, bld, cond->src[0].swizzle[0]);
+
+ if (devinfo->ver <= 5 &&
+ (cond->instr.pass_flags & BRW_NIR_BOOLEAN_MASK) == BRW_NIR_BOOLEAN_NEEDS_RESOLVE) {
+ /* redo boolean resolve on gen5 */
+ fs_reg masked = bld.vgrf(BRW_REGISTER_TYPE_D);
+ bld.AND(masked, cond_reg, brw_imm_d(1));
+ masked.negate = true;
+ fs_reg tmp = bld.vgrf(cond_reg.type);
+ bld.MOV(retype(tmp, BRW_REGISTER_TYPE_D), masked);
+ cond_reg = tmp;
+ }
} else {
invert = false;
cond_reg = get_nir_src(if_stmt->condition);
--
2.43.0

View File

@ -1,26 +0,0 @@
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index d50be23e871..e3697622635 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -695,17 +695,21 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
if (disp->Options.ForceSoftware)
RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
else {
+#if 0
bool success = false;
if (!disp->Options.Zink && !getenv("GALLIUM_DRIVER")) {
disp->Options.Zink = EGL_TRUE;
success = _eglDriver.Initialize(disp);
}
if (!success) {
+#endif
disp->Options.Zink = EGL_FALSE;
disp->Options.ForceSoftware = EGL_TRUE;
if (!_eglDriver.Initialize(disp))
RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
+#if 0
}
+#endif
}
}

View File

@ -0,0 +1,42 @@
meson: C type error in strtod_l/strtof_l probe
Future compilers will fail compilation due to the C type error:
…/testfile.c: In function 'main':
…/testfile.c:12:30: error: passing argument 2 of 'strtod_l' from incompatible pointer type
12 | double d = strtod_l(s, end, loc);
| ^~~
| |
| char *
/usr/include/stdlib.h:416:43: note: expected 'char ** restrict' but argument is of type 'char *'
416 | char **__restrict __endptr, locale_t __loc)
| ~~~~~~~~~~~~~~~~~~^~~~~~~~
…/testfile.c:13:29: error: passing argument 2 of 'strtof_l' from incompatible pointer type
13 | float f = strtof_l(s, end, loc);
| ^~~
| |
| char *
/usr/include/stdlib.h:420:42: note: expected 'char ** restrict' but argument is of type 'char *'
420 | char **__restrict __endptr, locale_t __loc)
| ~~~~~~~~~~~~~~~~~~^~~~~~~~
This means that the probe no longer tests is objective and always
fails.
Submitted upstream: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26927>
diff --git a/meson.build b/meson.build
index 35cc5f1cd5fd9079..1a5d2ba492be0b31 100644
--- a/meson.build
+++ b/meson.build
@@ -1425,8 +1425,8 @@ if cc.links('''
locale_t loc = newlocale(LC_CTYPE_MASK, "C", NULL);
const char *s = "1.0";
char *end;
- double d = strtod_l(s, end, loc);
- float f = strtof_l(s, end, loc);
+ double d = strtod_l(s, &end, loc);
+ float f = strtof_l(s, &end, loc);
freelocale(loc);
return 0;
}''',

View File

@ -61,7 +61,7 @@
Name: mesa
Summary: Mesa graphics libraries
%global ver 23.3.2
%global ver 23.3.3
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
Release: 100.bazzite.{{{ git_dir_version }}}
License: MIT AND BSD-3-Clause AND SGI-B-2.0
@ -74,9 +74,8 @@ Source0: https://archive.mesa3d.org/mesa-%{ver}.tar.xz
Source1: Mesa-MLAA-License-Clarification-Email.txt
Patch10: gnome-shell-glthread-disable.patch
Patch11: 0001-intel-compiler-reemit-boolean-resolve-for-inverted-i.patch
Patch12: 0001-intel-compiler-fix-release-build-unused-variable.patch
Patch13: disable-zink-egl-fallback.patch
Patch11: zink-fix-resizable-bar-detection-logic.patch
Patch12: mesa-meson-c99.patch
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26105/
Patch30: 26105.patch

View File

@ -0,0 +1,39 @@
From a077c14f150f1c4f670dce381ac2eb548f1a4ac2 Mon Sep 17 00:00:00 2001
From: Alessandro Astone <ales.astone@gmail.com>
Date: Wed, 10 Jan 2024 17:24:30 +0100
Subject: [PATCH] zink: Fix resizable BAR detection logic
This was broken in two ways:
* When looking for the MAX biggest_ram it was actually comparing
a candidate against biggest_vis_ram
* mem_props.memoryTypes[] should be accessed with the memory type
index as found in heap_map
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10341
Cc: 23.3 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26979>
---
src/gallium/drivers/zink/zink_screen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 5a6d17cb4fa3..6697d7ab938c 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -3258,10 +3258,10 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
{
uint64_t biggest_vis_vram = 0;
for (unsigned i = 0; i < screen->heap_count[ZINK_HEAP_DEVICE_LOCAL_VISIBLE]; i++)
- biggest_vis_vram = MAX2(biggest_vis_vram, screen->info.mem_props.memoryHeaps[screen->info.mem_props.memoryTypes[i].heapIndex].size);
+ biggest_vis_vram = MAX2(biggest_vis_vram, screen->info.mem_props.memoryHeaps[screen->info.mem_props.memoryTypes[screen->heap_map[ZINK_HEAP_DEVICE_LOCAL_VISIBLE][i]].heapIndex].size);
uint64_t biggest_vram = 0;
for (unsigned i = 0; i < screen->heap_count[ZINK_HEAP_DEVICE_LOCAL]; i++)
- biggest_vram = MAX2(biggest_vis_vram, screen->info.mem_props.memoryHeaps[screen->info.mem_props.memoryTypes[i].heapIndex].size);
+ biggest_vram = MAX2(biggest_vram, screen->info.mem_props.memoryHeaps[screen->info.mem_props.memoryTypes[screen->heap_map[ZINK_HEAP_DEVICE_LOCAL][i]].heapIndex].size);
/* determine if vis vram is roughly equal to total vram */
if (biggest_vis_vram > biggest_vram * 0.9)
screen->resizable_bar = true;
--
GitLab