Compare commits
2 Commits
ced931ff6e
...
c583ea6506
Author | SHA1 | Date | |
---|---|---|---|
|
c583ea6506 | ||
|
15db5e9b84 |
1
.mesa.metadata
Normal file
1
.mesa.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
13b0767105f93a5b2d3c2b620e2f3cd7ce67c0f5 mesa-23.3.3.tar.xz
|
@ -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
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
From a89bf9e86a83005befcdcef47a94fff167bdc47b Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= <jexposit@redhat.com>
|
|
||||||
Date: Wed, 22 Nov 2023 12:48:47 +0100
|
|
||||||
Subject: [PATCH] zink: initialize drm_fd to -1
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
The `zink_internal_create_screen()` function initializes
|
|
||||||
`screen->drm_fd` to 0, a valid file descriptor value, via `rzalloc`.
|
|
||||||
|
|
||||||
If an error is found during initialization, the `zink_destroy_screen()`
|
|
||||||
function is invoked in the `fail` label and the `screen->drm_fd` is
|
|
||||||
closed because its value is 0 and `screen->drm_fd != -1` is checked.
|
|
||||||
|
|
||||||
Initialize `screen->drm_fd` to -1 to avoid this issue.
|
|
||||||
|
|
||||||
Resolves: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10191
|
|
||||||
Signed-off-by: José Expósito <jexposit@redhat.com>
|
|
||||||
---
|
|
||||||
src/gallium/drivers/zink/zink_screen.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
|
|
||||||
index 50168d8daa1..f42f340657b 100644
|
|
||||||
--- a/src/gallium/drivers/zink/zink_screen.c
|
|
||||||
+++ b/src/gallium/drivers/zink/zink_screen.c
|
|
||||||
@@ -3126,6 +3126,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ screen->drm_fd = -1;
|
|
||||||
+
|
|
||||||
glsl_type_singleton_init_or_ref();
|
|
||||||
zink_debug = debug_get_option_zink_debug();
|
|
||||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_AUTO)
|
|
||||||
--
|
|
||||||
2.42.0
|
|
||||||
|
|
103
0002-Revert-glx-add-automatic-zink-fallback-loading-betwe.patch
Normal file
103
0002-Revert-glx-add-automatic-zink-fallback-loading-betwe.patch
Normal 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
|
||||||
|
|
42
mesa-meson-c99.patch
Normal file
42
mesa-meson-c99.patch
Normal 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;
|
||||||
|
}''',
|
24
mesa.spec
24
mesa.spec
@ -52,9 +52,9 @@
|
|||||||
|
|
||||||
Name: mesa
|
Name: mesa
|
||||||
Summary: Mesa graphics libraries
|
Summary: Mesa graphics libraries
|
||||||
%global ver 23.3.0-rc2
|
%global ver 23.3.3
|
||||||
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
|
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://www.mesa3d.org
|
URL: http://www.mesa3d.org
|
||||||
|
|
||||||
@ -66,10 +66,13 @@ Source1: Mesa-MLAA-License-Clarification-Email.txt
|
|||||||
|
|
||||||
Patch10: gnome-shell-glthread-disable.patch
|
Patch10: gnome-shell-glthread-disable.patch
|
||||||
Patch12: radeonsi-turn-off-glthread.patch
|
Patch12: radeonsi-turn-off-glthread.patch
|
||||||
Patch13: 0001-nir-add-deref-follower-builder-for-casts.patch
|
Patch13: zink-fix-resizable-bar-detection-logic.patch
|
||||||
Patch14: 0001-zink-Fix-crash-on-zink_create_screen-error-path.patch
|
Patch14: mesa-meson-c99.patch
|
||||||
Patch15: 0001-zink-allow-software-rendering-only-if-selected.patch
|
# Temporary disabling Zink as a fallback between HW and SW drivers due to
|
||||||
Patch16: 0001-zink-initialize-drm_fd-to-1.patch
|
# 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: meson >= 0.45
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -356,6 +359,9 @@ cp %{SOURCE1} docs/
|
|||||||
-Dlibunwind=disabled \
|
-Dlibunwind=disabled \
|
||||||
-Dlmsensors=disabled \
|
-Dlmsensors=disabled \
|
||||||
-Dandroid-libbacktrace=disabled \
|
-Dandroid-libbacktrace=disabled \
|
||||||
|
%ifarch %{ix86}
|
||||||
|
-Dglx-read-only-text=true \
|
||||||
|
%endif
|
||||||
%{nil}
|
%{nil}
|
||||||
%meson_build
|
%meson_build
|
||||||
|
|
||||||
@ -610,6 +616,12 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%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
|
* Wed Nov 22 2023 José Expósito <jexposit@redhat.com> - 23.3.0-rc2-3
|
||||||
- Backport MR #26332 to fix X11 session on VMs
|
- Backport MR #26332 to fix X11 session on VMs
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (mesa-23.3.0-rc2.tar.xz) = bebb27bcc860ef85b9f17001e00d83bdd4e6172c5ac7bdd3dd143814abe8e3b9443cea436db1df580834609f80ebdb46a01f3c66c141042a80f59434b5fd85aa
|
SHA512 (mesa-23.3.3.tar.xz) = bed23e8324b026edd5d2b16a381ec563cf2fa9be9c8fbe8d9fb907cab9d87eef91f493fb9d4e3973d4b679e271d2a85ce48af491585638ab97f087532fc63c30
|
||||||
|
39
zink-fix-resizable-bar-detection-logic.patch
Normal file
39
zink-fix-resizable-bar-detection-logic.patch
Normal 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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user