import UBI mesa-23.3.3-1.el9

This commit is contained in:
eabdullin 2024-04-30 15:17:32 +00:00
parent 2b56d179c4
commit 2e216ad5a3
8 changed files with 254 additions and 4 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/mesa-23.1.4.tar.xz
SOURCES/mesa-23.3.3.tar.xz

View File

@ -1 +1 @@
d534f7854afa284ca73cfa9aa2d7a1e1adccfc50 SOURCES/mesa-23.1.4.tar.xz
13b0767105f93a5b2d3c2b620e2f3cd7ce67c0f5 SOURCES/mesa-23.3.3.tar.xz

View File

@ -0,0 +1,40 @@
From b673271710047acb1976002e4b84d06b7cefd3d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= <jexposit@redhat.com>
Date: Wed, 17 Jan 2024 13:20:49 +0100
Subject: [PATCH 1/2] Revert "egl: add automatic zink fallback loading between
hw and sw drivers"
This reverts commit 8cd44b8843877a2f7d559d123eb3694841f16fdc.
---
src/egl/main/eglapi.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index d50be23e871..b1a48668b76 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -695,17 +695,10 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
if (disp->Options.ForceSoftware)
RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
else {
- bool success = false;
- if (!disp->Options.Zink && !getenv("GALLIUM_DRIVER")) {
- disp->Options.Zink = EGL_TRUE;
- success = _eglDriver.Initialize(disp);
- }
- if (!success) {
- disp->Options.Zink = EGL_FALSE;
- disp->Options.ForceSoftware = EGL_TRUE;
- if (!_eglDriver.Initialize(disp))
- RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
- }
+ disp->Options.Zink = EGL_FALSE;
+ disp->Options.ForceSoftware = EGL_TRUE;
+ if (!_eglDriver.Initialize(disp))
+ RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
}
}
--
2.43.0

View File

@ -0,0 +1,103 @@
From 9b9d225931b69532aa1b43abdaf29c826bc47b26 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= <jexposit@redhat.com>
Date: Wed, 17 Jan 2024 13:21:08 +0100
Subject: [PATCH 2/2] Revert "glx: add automatic zink fallback loading between
hw and sw drivers"
This reverts commit 7d9ea77b4598e23d4415b529924f1cbdca6e33bd.
---
src/glx/glxext.c | 33 ++++++++-------------------------
1 file changed, 8 insertions(+), 25 deletions(-)
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 39d5f08bdcf..5036fd137c1 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -763,11 +763,10 @@ glx_screen_cleanup(struct glx_screen *psc)
** If that works then fetch the per screen configs data.
*/
static Bool
-AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv, Bool zink)
+AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv)
{
struct glx_screen *psc;
GLint i, screens;
- unsigned screen_count = 0;
/*
** First allocate memory for the array of per screen configs.
@@ -804,21 +803,17 @@ AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv, Bool zink)
if (psc == NULL)
psc = applegl_create_screen(i, priv);
#else
- if (psc == NULL && !zink)
+ if (psc == NULL)
{
psc = indirect_create_screen(i, priv);
indirect = true;
}
#endif
priv->screens[i] = psc;
- if (psc)
- screen_count++;
if(indirect) /* Load extensions required only for indirect glx */
glxSendClientInfo(priv, i);
}
- if (zink && !screen_count)
- return GL_FALSE;
SyncHandle();
return GL_TRUE;
}
@@ -880,9 +875,9 @@ __glXInitialize(Display * dpy)
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
Bool glx_direct = !debug_get_bool_option("LIBGL_ALWAYS_INDIRECT", false);
Bool glx_accel = !debug_get_bool_option("LIBGL_ALWAYS_SOFTWARE", false);
+ Bool zink;
const char *env = getenv("MESA_LOADER_DRIVER_OVERRIDE");
- Bool zink = env && !strcmp(env, "zink");
- Bool try_zink = False;
+ zink = env && !strcmp(env, "zink");
dpyPriv->drawHash = __glxHashCreate();
@@ -904,13 +899,10 @@ __glXInitialize(Display * dpy)
#endif /* HAVE_DRI3 */
if (!debug_get_bool_option("LIBGL_DRI2_DISABLE", false))
dpyPriv->dri2Display = dri2CreateDisplay(dpy);
- if (!dpyPriv->dri3Display && !dpyPriv->dri2Display)
- try_zink = !debug_get_bool_option("LIBGL_KOPPER_DISABLE", false) &&
- !getenv("GALLIUM_DRIVER");
}
#endif /* GLX_USE_DRM */
if (glx_direct)
- dpyPriv->driswDisplay = driswCreateDisplay(dpy, zink | try_zink);
+ dpyPriv->driswDisplay = driswCreateDisplay(dpy, zink);
#ifdef GLX_USE_WINDOWSGL
if (glx_direct && glx_accel)
@@ -925,18 +917,9 @@ __glXInitialize(Display * dpy)
}
#endif
- if (!AllocAndFetchScreenConfigs(dpy, dpyPriv, zink | try_zink)) {
- Bool fail = True;
- if (try_zink) {
- free(dpyPriv->screens);
- dpyPriv->driswDisplay->destroyDisplay(dpyPriv->driswDisplay);
- dpyPriv->driswDisplay = driswCreateDisplay(dpy, false);
- fail = !AllocAndFetchScreenConfigs(dpy, dpyPriv, False);
- }
- if (fail) {
- free(dpyPriv);
- return NULL;
- }
+ if (!AllocAndFetchScreenConfigs(dpy, dpyPriv)) {
+ free(dpyPriv);
+ return NULL;
}
glxSendClientInfo(dpyPriv, -1);
--
2.43.0

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

@ -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

@ -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

View File

@ -52,7 +52,7 @@
Name: mesa
Summary: Mesa graphics libraries
%global ver 23.1.4
%global ver 23.3.3
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
Release: 1%{?dist}
License: MIT
@ -66,6 +66,13 @@ Source1: Mesa-MLAA-License-Clarification-Email.txt
Patch10: gnome-shell-glthread-disable.patch
Patch12: radeonsi-turn-off-glthread.patch
Patch13: zink-fix-resizable-bar-detection-logic.patch
Patch14: mesa-meson-c99.patch
# Temporary disabling Zink as a fallback between HW and SW drivers due to
# multiple regression caused by this change during the 23.3.X development cycle.
# Remove these 2 patches if updating to 24.X.X:
Patch15: 0001-Revert-egl-add-automatic-zink-fallback-loading-betwe.patch
Patch16: 0002-Revert-glx-add-automatic-zink-fallback-loading-betwe.patch
BuildRequires: meson >= 0.45
BuildRequires: gcc
@ -352,6 +359,9 @@ cp %{SOURCE1} docs/
-Dlibunwind=disabled \
-Dlmsensors=disabled \
-Dandroid-libbacktrace=disabled \
%ifarch %{ix86}
-Dglx-read-only-text=true \
%endif
%{nil}
%meson_build
@ -540,6 +550,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 +616,21 @@ popd
%endif
%changelog
* Wed Jan 17 2024 José Expósito <jexposit@redhat.com> - 23.3.3-1
- Update to mesa 23.3.3
* 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
* Fri Nov 17 2023 José Expósito <jexposit@redhat.com> - 23.3.0-rc2-2
- Backport MR #26220 to fix GNOME apps crash
* 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