Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package libnvidia-egl-wayland2 for
openSUSE:Factory checked in at 2026-02-04 21:10:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libnvidia-egl-wayland2 (Old)
and /work/SRC/openSUSE:Factory/.libnvidia-egl-wayland2.new.1670 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libnvidia-egl-wayland2"
Wed Feb 4 21:10:12 2026 rev:2 rq:1331012 version:1.0.1~20251213gitMACRO
Changes:
--------
---
/work/SRC/openSUSE:Factory/libnvidia-egl-wayland2/libnvidia-egl-wayland2.changes
2026-01-08 15:26:47.783477846 +0100
+++
/work/SRC/openSUSE:Factory/.libnvidia-egl-wayland2.new.1670/libnvidia-egl-wayland2.changes
2026-02-04 21:10:39.532062076 +0100
@@ -1,0 +2,26 @@
+Wed Feb 4 14:22:19 UTC 2026 - Stefan Dirsch <[email protected]>
+
+- list patches from git since 1.0.0-rc release
+ * 0001-egl-wayland2-close-dmabuf-format-table-fd.patch
+ * 0002-Update-the-wl_egl_window-attached-size.patch
+ * 0003-egl-wayland2-Fix-libdrm-loading-when-wl_drm-is-not-a.patch
+ * 0004-Remove-a-stray-abort-in-eplWlCreateWindowSurface.patch
+ * 0005-Increment-version-number-to-1.0.1.patch
+ * 0006-base-Add-basic-support-for-EGL_KHR_partial_update.patch
+ * 0007-base-Add-an-EplImplFuncs-function-for-EGL_BUFFER_AGE.patch
+ * 0008-base-Add-an-EplImplFuncs-function-for-eglSetDamageRe.patch
+ * 0009-wayland-Implement-EplImplFuncs-QueryBufferAge.patch
+ * 0010-Fix-the-version-check-for-wl_surface.patch
+ * 0011-wayland-Flip-the-damage-rectangles-in-wl_surface_dam.patch
+ * 0012-egl-wayland2-add-FP16-DRM-format.patch
+ * 0014-Fix-multisampled-windows.patch
+ * 0015-Disable-multisampled-windows-on-older-drivers.patch
+ * 0016-Don-t-pass-EGL_RENDER_BUFFER-to-the-driver.patch
+ * 0017-Fix-an-incorrect-return-statement-in-eplWlSwapBuffer.patch
+ * 0018-Replace-SurfaceFeedbackState-modifiers_changed-with-.patch
+- added latest fixes from git
+ * 0019-Don-t-use-the-wl_display-during-teardown.patch
+ * 0020-Fix-building-on-FreeBSD.patch
+ * 0021-Fix-NULL-pointer-passed-to-wl_event_queue_destroy.patch
+
+-------------------------------------------------------------------
New:
----
0019-Don-t-use-the-wl_display-during-teardown.patch
0020-Fix-building-on-FreeBSD.patch
0021-Fix-NULL-pointer-passed-to-wl_event_queue_destroy.patch
----------(New B)----------
New:- added latest fixes from git
* 0019-Don-t-use-the-wl_display-during-teardown.patch
* 0020-Fix-building-on-FreeBSD.patch
New: * 0019-Don-t-use-the-wl_display-during-teardown.patch
* 0020-Fix-building-on-FreeBSD.patch
* 0021-Fix-NULL-pointer-passed-to-wl_event_queue_destroy.patch
New: * 0020-Fix-building-on-FreeBSD.patch
* 0021-Fix-NULL-pointer-passed-to-wl_event_queue_destroy.patch
----------(New E)----------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libnvidia-egl-wayland2.spec ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.468143157 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.472143324 +0100
@@ -59,6 +59,9 @@
Patch16: 0016-Don-t-pass-EGL_RENDER_BUFFER-to-the-driver.patch
Patch17: 0017-Fix-an-incorrect-return-statement-in-eplWlSwapBuffer.patch
Patch18: 0018-Replace-SurfaceFeedbackState-modifiers_changed-with-.patch
+Patch19: 0019-Don-t-use-the-wl_display-during-teardown.patch
+Patch20: 0020-Fix-building-on-FreeBSD.patch
+Patch21: 0021-Fix-NULL-pointer-passed-to-wl_event_queue_destroy.patch
BuildRequires: Mesa-libGL-devel
BuildRequires: gcc-c++
BuildRequires: meson >= 0.50
++++++ 0001-egl-wayland2-close-dmabuf-format-table-fd.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.500144498 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.504144665 +0100
@@ -1,7 +1,7 @@
From 9ae4f1daf3c9f1a30ef0870d74db7196c3fe8ebf Mon Sep 17 00:00:00 2001
From: Austin Shafer <[email protected]>
Date: Tue, 5 Aug 2025 13:02:45 -0400
-Subject: [PATCH 01/18] egl-wayland2: close dmabuf format table fd
+Subject: [PATCH 01/21] egl-wayland2: close dmabuf format table fd
The compositor sends us a memfd for the format table, we need to
actually close it once we are done. This is causing an fd leak on
++++++ 0002-Update-the-wl_egl_window-attached-size.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.520145335 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.524145503 +0100
@@ -1,7 +1,7 @@
From ab4d5af9899d05ccbc363c4ec0e4f02d6525bf3e Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Tue, 5 Aug 2025 16:41:23 -0600
-Subject: [PATCH 02/18] Update the wl_egl_window attached size.
+Subject: [PATCH 02/21] Update the wl_egl_window attached size.
In eglSwapBuffers, after sending the wl_surface::commit request, update
wl_egl_window::attached_width and attached_height to the size of the
++++++ 0003-egl-wayland2-Fix-libdrm-loading-when-wl_drm-is-not-a.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.540146173 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.544146340 +0100
@@ -1,7 +1,7 @@
From eb31eb3674829a12e8b49dee17b5f3d3ab92d31d Mon Sep 17 00:00:00 2001
From: Austin Shafer <[email protected]>
Date: Fri, 5 Sep 2025 15:14:27 -0400
-Subject: [PATCH 03/18] egl-wayland2: Fix libdrm loading when wl_drm is not
+Subject: [PATCH 03/21] egl-wayland2: Fix libdrm loading when wl_drm is not
available
If the compositor does not support wl_drm and we fail to get the
++++++ 0004-Remove-a-stray-abort-in-eplWlCreateWindowSurface.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.560147010 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.564147178 +0100
@@ -1,7 +1,7 @@
From fa3c994af319e265f3ff3da2bb2d76e0b993128a Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Tue, 14 Oct 2025 15:11:57 -0600
-Subject: [PATCH 04/18] Remove a stray abort() in eplWlCreateWindowSurface.
+Subject: [PATCH 04/21] Remove a stray abort() in eplWlCreateWindowSurface.
---
src/wayland/wayland-surface.c | 1 -
++++++ 0005-Increment-version-number-to-1.0.1.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.580147848 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.584148015 +0100
@@ -1,7 +1,7 @@
From bdf038ba6e2b31014ca232c849dd8610c2cb4b3f Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Thu, 16 Oct 2025 11:38:03 -0600
-Subject: [PATCH 05/18] Increment version number to 1.0.1.
+Subject: [PATCH 05/21] Increment version number to 1.0.1.
---
meson.build | 2 +-
++++++ 0006-base-Add-basic-support-for-EGL_KHR_partial_update.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.604148853 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.608149020 +0100
@@ -1,7 +1,7 @@
From dcbb123f1804572889d2dc45af00e89ee9e5ff4f Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Tue, 14 Oct 2025 16:33:47 -0600
-Subject: [PATCH 06/18] base: Add basic support for EGL_KHR_partial_update.
+Subject: [PATCH 06/21] base: Add basic support for EGL_KHR_partial_update.
Add the necessary bookkeeping to handle EGL_KHR_partial_update and
EGL_EXT_buffer_age.
++++++ 0007-base-Add-an-EplImplFuncs-function-for-EGL_BUFFER_AGE.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.628149858 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.632150025 +0100
@@ -1,7 +1,7 @@
From 94f578e48cbcde2468385b7187b71d22b2bb9ba2 Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Tue, 14 Oct 2025 16:42:08 -0600
-Subject: [PATCH 07/18] base: Add an EplImplFuncs function for EGL_BUFFER_AGE.
+Subject: [PATCH 07/21] base: Add an EplImplFuncs function for EGL_BUFFER_AGE.
Add a new function, EplImplFuncs::QueryBufferAge, which is used to check
the value of EGL_BUFFER_AGE for a surface.
++++++ 0008-base-Add-an-EplImplFuncs-function-for-eglSetDamageRe.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.648150696 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.652150864 +0100
@@ -1,7 +1,7 @@
From 83c95316e8758ae46232d78d7425fdefcedb603c Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Tue, 14 Oct 2025 16:49:33 -0600
-Subject: [PATCH 08/18] base: Add an EplImplFuncs function for
+Subject: [PATCH 08/21] base: Add an EplImplFuncs function for
eglSetDamageRegionKHR
Add an optional EplImplFuncs::SetDamageRegion function to implement
++++++ 0009-wayland-Implement-EplImplFuncs-QueryBufferAge.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.668151533 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.672151701 +0100
@@ -1,7 +1,7 @@
From 40d205187661699d96d2e27ece56af9bf61295aa Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Tue, 14 Oct 2025 17:00:07 -0600
-Subject: [PATCH 09/18] wayland: Implement EplImplFuncs::QueryBufferAge.
+Subject: [PATCH 09/21] wayland: Implement EplImplFuncs::QueryBufferAge.
Add a buffer_age field to WlPresentBuffer, and add a new
eplWlSwapChainUpdateBufferAge function to increment the ages of the
++++++ 0010-Fix-the-version-check-for-wl_surface.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.692152538 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.696152707 +0100
@@ -1,7 +1,7 @@
From d1f80ea8ab4d3b808854673975dbf1e1ea9dac9d Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Tue, 21 Oct 2025 12:00:27 -0600
-Subject: [PATCH 10/18] Fix the version check for wl_surface.
+Subject: [PATCH 10/21] Fix the version check for wl_surface.
In eplWlSwapBuffers, fix the version check for whether
wl_surface::damage_buffer is available. It was checking against version
++++++ 0011-wayland-Flip-the-damage-rectangles-in-wl_surface_dam.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.708153208 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.712153377 +0100
@@ -1,7 +1,7 @@
From 4b95dc9879a812a812f1e77d31f63220e378b5a7 Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Fri, 7 Nov 2025 11:47:29 -0700
-Subject: [PATCH 11/18] wayland: Flip the damage rectangles in
+Subject: [PATCH 11/21] wayland: Flip the damage rectangles in
wl_surface_damage_buffer
Flip the Y coordinate for the damage rectangles.
++++++ 0012-egl-wayland2-add-FP16-DRM-format.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.732154213 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.736154382 +0100
@@ -1,7 +1,7 @@
From 4f027414b95d358c8f088b7631a5755f1639e10e Mon Sep 17 00:00:00 2001
From: Austin Shafer <[email protected]>
Date: Mon, 27 Oct 2025 14:03:55 -0400
-Subject: [PATCH 12/18] egl-wayland2: add FP16 DRM format
+Subject: [PATCH 12/21] egl-wayland2: add FP16 DRM format
---
src/base/config-list.c | 1 +
++++++ 0014-Fix-multisampled-windows.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.752155052 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.756155219 +0100
@@ -1,7 +1,7 @@
From d67240ab29f0dd4af4320fc3288842b24b3c8777 Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Mon, 10 Nov 2025 14:34:04 -0700
-Subject: [PATCH 14/18] Fix multisampled windows.
+Subject: [PATCH 14/21] Fix multisampled windows.
Multisampling requires the driver to downsample the image before
presentation, which wasn't getting called.
++++++ 0015-Disable-multisampled-windows-on-older-drivers.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.772155890 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.776156057 +0100
@@ -1,7 +1,7 @@
From 0c15809fcfb3fcf4b2eb2422fdd1dae4f9aea6ae Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Mon, 10 Nov 2025 14:41:53 -0700
-Subject: [PATCH 15/18] Disable multisampled windows on older drivers.
+Subject: [PATCH 15/21] Disable multisampled windows on older drivers.
Multisampled windows require additional driver support that was added in
version 0.2 of the platform surface interface.
++++++ 0016-Don-t-pass-EGL_RENDER_BUFFER-to-the-driver.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.792156726 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.796156895 +0100
@@ -1,7 +1,7 @@
From 14c013b12ef4cccdabaa7df5269939a563d51898 Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Mon, 24 Nov 2025 11:25:15 -0700
-Subject: [PATCH 16/18] Don't pass EGL_RENDER_BUFFER to the driver.
+Subject: [PATCH 16/21] Don't pass EGL_RENDER_BUFFER to the driver.
In eplWlCreateWindowSurface, if the application passes the
EGL_RENDER_BUFFER attribute, then consume it locally instead of passing
++++++ 0017-Fix-an-incorrect-return-statement-in-eplWlSwapBuffer.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.816157732 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.820157900 +0100
@@ -1,7 +1,7 @@
From 797026638f234a4a178c5ca6be8939df6ebd5afd Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Wed, 10 Dec 2025 08:31:56 -0700
-Subject: [PATCH 17/18] Fix an incorrect return statement in eplWlSwapBuffers.
+Subject: [PATCH 17/21] Fix an incorrect return statement in eplWlSwapBuffers.
In eplWlSwapBuffers, if WaitForPreviousFrames fails, then do all the
necessary cleanup before returning.
++++++ 0018-Replace-SurfaceFeedbackState-modifiers_changed-with-.patch ++++++
--- /var/tmp/diff_new_pack.fecWe3/_old 2026-02-04 21:10:41.840158737 +0100
+++ /var/tmp/diff_new_pack.fecWe3/_new 2026-02-04 21:10:41.844158905 +0100
@@ -1,7 +1,7 @@
From a6d6523b6b7ec9e5649a0dd13d417586d814e209 Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Wed, 10 Dec 2025 08:19:14 -0700
-Subject: [PATCH 18/18] Replace SurfaceFeedbackState::modifiers_changed with a
+Subject: [PATCH 18/21] Replace SurfaceFeedbackState::modifiers_changed with a
counter
Currently, we set the modifiers_changed flag upon receiving new surface
++++++ 0019-Don-t-use-the-wl_display-during-teardown.patch ++++++
>From 744774943caf4ff0ab95687ae0f6d3e11ea7c44d Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Mon, 15 Dec 2025 15:46:18 -0700
Subject: [PATCH 19/21] Don't use the wl_display during teardown.
Some applications will call wl_display_disconnect but not eglTerminate
before exiting, which leads to segfaults or hangs when we try to clean
up the EGLDisplay.
While that's technically an app bug, it's a common enough one to be
worth trying to work around.
To do that, add a new eplWlDisplayInstanceIsNativeValid function, which
returns true if we expect the wl_display to still be valid. In this
case, that means either we're not in teardown, or the native display was
NULL and so egl-wayland2 has its own wl_display. We can update that if
Wayland ever gains an equivalent to XESetCloseDisplay.
In eplWlDestroyWindow and eplWlDisplayInstanceFree, avoid calling any
Wayland functions if eplWlDisplayInstanceIsNativeValid returns false.
We'll just leak any queues or proxy structs that libwayland didn't clean
up.
---
src/wayland/wayland-display.c | 25 ++++++++---
src/wayland/wayland-display.h | 10 +++++
src/wayland/wayland-surface.c | 75 +++++++++++++++++----------------
src/wayland/wayland-swapchain.c | 4 +-
src/wayland/wayland-timeline.c | 5 ++-
5 files changed, 74 insertions(+), 45 deletions(-)
diff --git a/src/wayland/wayland-display.c b/src/wayland/wayland-display.c
index f522ca4..789f787 100644
--- a/src/wayland/wayland-display.c
+++ b/src/wayland/wayland-display.c
@@ -1153,13 +1153,21 @@ static void eplWlDisplayInstanceFree(WlDisplayInstance
*inst)
eplInternalDisplayUnref(inst->internal_display);
}
- if (inst->globals.dmabuf != NULL)
- {
- zwp_linux_dmabuf_v1_destroy(inst->globals.dmabuf);
- }
- if (inst->globals.syncobj != NULL)
+ /*
+ * If we're going through teardown, then the application may have
+ * already called wl_display_disconnect, so we can't safely touch
+ * the wl_display or any proxies or queues.
+ */
+ if (eplWlDisplayInstanceIsNativeValid(inst))
{
- wp_linux_drm_syncobj_manager_v1_destroy(inst->globals.syncobj);
+ if (inst->globals.dmabuf != NULL)
+ {
+ zwp_linux_dmabuf_v1_destroy(inst->globals.dmabuf);
+ }
+ if (inst->globals.syncobj != NULL)
+ {
+ wp_linux_drm_syncobj_manager_v1_destroy(inst->globals.syncobj);
+ }
}
if (inst->own_display && inst->wdpy != NULL)
@@ -1212,3 +1220,8 @@ const char *eplWlHookQueryString(EGLDisplay edpy, EGLint
name)
eplDisplayRelease(pdpy);
return str;
}
+
+EGLBoolean eplWlDisplayInstanceIsNativeValid(WlDisplayInstance *inst)
+{
+ return inst != NULL && (!inst->platform->destroyed || inst->own_display);
+}
diff --git a/src/wayland/wayland-display.h b/src/wayland/wayland-display.h
index 39a4fa5..6cf3539 100644
--- a/src/wayland/wayland-display.h
+++ b/src/wayland/wayland-display.h
@@ -180,4 +180,14 @@ void eplWlTerminateDisplay(EplPlatformData *plat,
EplDisplay *pdpy);
const char *eplWlHookQueryString(EGLDisplay edpy, EGLint name);
+/**
+ * Returns true if the native display is still expected to be valid.
+ *
+ * This will return false during teardown for an application-owned wl_display.
+ * Some applications will call wl_display_disconnect but not eglTerminate
+ * before they terminate, in which trying to do anything with the wl_display
+ * could cause a crash or hang.
+ */
+EGLBoolean eplWlDisplayInstanceIsNativeValid(WlDisplayInstance *inst);
+
#endif // WAYLAND_DISPLAY_H
diff --git a/src/wayland/wayland-surface.c b/src/wayland/wayland-surface.c
index ae5c165..0a66c46 100644
--- a/src/wayland/wayland-surface.c
+++ b/src/wayland/wayland-surface.c
@@ -509,7 +509,8 @@ static void DestroySurfaceFeedback(EplSurface *psurf)
{
if (psurf->priv->current.feedback != NULL)
{
- if (psurf->priv->current.feedback->feedback != NULL)
+ if (psurf->priv->current.feedback->feedback != NULL
+ && eplWlDisplayInstanceIsNativeValid(psurf->priv->inst))
{
zwp_linux_dmabuf_feedback_v1_destroy(psurf->priv->current.feedback->feedback);
}
@@ -1069,11 +1070,6 @@ void eplWlDestroyWindow(EplDisplay *pdpy, EplSurface
*psurf,
psurf->internal_surface = EGL_NO_SURFACE;
}
- if (psurf->priv->current.wsurf != NULL)
- {
- wl_proxy_wrapper_destroy(psurf->priv->current.wsurf);
- }
-
if (psurf->priv->params.native_window != NULL)
{
psurf->priv->params.native_window->resize_callback = NULL;
@@ -1091,37 +1087,44 @@ void eplWlDestroyWindow(EplDisplay *pdpy, EplSurface
*psurf,
DestroySurfaceFeedback(psurf);
- if (psurf->priv->current.syncobj != NULL)
- {
- wp_linux_drm_syncobj_surface_v1_destroy(psurf->priv->current.syncobj);
- }
- if (psurf->priv->current.frame_callback != NULL)
+ if (eplWlDisplayInstanceIsNativeValid(pdpy->priv->inst))
{
- wl_callback_destroy(psurf->priv->current.frame_callback);
- }
- if (psurf->priv->current.last_swap_sync != NULL)
- {
- wl_callback_destroy(psurf->priv->current.last_swap_sync);
- }
- if (psurf->priv->current.presentation_feedback != NULL)
- {
-
wp_presentation_feedback_destroy(psurf->priv->current.presentation_feedback);
- }
- if (psurf->priv->current.fifo != NULL)
- {
- wp_fifo_v1_destroy(psurf->priv->current.fifo);
- }
- if (psurf->priv->current.commit_timer != NULL)
- {
- wp_commit_timer_v1_destroy(psurf->priv->current.commit_timer);
- }
- if (psurf->priv->current.presentation_time != NULL)
- {
- wl_proxy_wrapper_destroy(psurf->priv->current.presentation_time);
- }
- if (psurf->priv->current.queue != NULL)
- {
- wl_event_queue_destroy(psurf->priv->current.queue);
+ if (psurf->priv->current.wsurf != NULL)
+ {
+ wl_proxy_wrapper_destroy(psurf->priv->current.wsurf);
+ }
+ if (psurf->priv->current.syncobj != NULL)
+ {
+
wp_linux_drm_syncobj_surface_v1_destroy(psurf->priv->current.syncobj);
+ }
+ if (psurf->priv->current.frame_callback != NULL)
+ {
+ wl_callback_destroy(psurf->priv->current.frame_callback);
+ }
+ if (psurf->priv->current.last_swap_sync != NULL)
+ {
+ wl_callback_destroy(psurf->priv->current.last_swap_sync);
+ }
+ if (psurf->priv->current.presentation_feedback != NULL)
+ {
+
wp_presentation_feedback_destroy(psurf->priv->current.presentation_feedback);
+ }
+ if (psurf->priv->current.fifo != NULL)
+ {
+ wp_fifo_v1_destroy(psurf->priv->current.fifo);
+ }
+ if (psurf->priv->current.commit_timer != NULL)
+ {
+ wp_commit_timer_v1_destroy(psurf->priv->current.commit_timer);
+ }
+ if (psurf->priv->current.presentation_time != NULL)
+ {
+ wl_proxy_wrapper_destroy(psurf->priv->current.presentation_time);
+ }
+ if (psurf->priv->current.queue != NULL)
+ {
+ wl_event_queue_destroy(psurf->priv->current.queue);
+ }
}
pthread_mutex_destroy(&psurf->priv->params.mutex);
diff --git a/src/wayland/wayland-swapchain.c b/src/wayland/wayland-swapchain.c
index 58eacd5..a51f4c4 100644
--- a/src/wayland/wayland-swapchain.c
+++ b/src/wayland/wayland-swapchain.c
@@ -46,7 +46,7 @@ static void DestroyPresentBuffer(WlDisplayInstance *inst,
WlPresentBuffer *buffe
{
if (buffer != NULL)
{
- if (buffer->wbuf != NULL)
+ if (buffer->wbuf != NULL && eplWlDisplayInstanceIsNativeValid(inst))
{
wl_buffer_destroy(buffer->wbuf);
}
@@ -298,7 +298,7 @@ void eplWlSwapChainDestroy(WlDisplayInstance *inst,
WlSwapChain *swapchain)
DestroyPresentBuffer(inst, buffer);
}
- if (swapchain->queue != NULL)
+ if (swapchain->queue != NULL &&
eplWlDisplayInstanceIsNativeValid(inst))
{
wl_event_queue_destroy(swapchain->queue);
}
diff --git a/src/wayland/wayland-timeline.c b/src/wayland/wayland-timeline.c
index 8df4743..4b87c30 100644
--- a/src/wayland/wayland-timeline.c
+++ b/src/wayland/wayland-timeline.c
@@ -82,7 +82,10 @@ void eplWlTimelineDestroy(WlDisplayInstance *inst,
WlTimeline *timeline)
{
if (timeline->wtimeline != NULL)
{
- wp_linux_drm_syncobj_timeline_v1_destroy(timeline->wtimeline);
+ if (eplWlDisplayInstanceIsNativeValid(inst))
+ {
+ wp_linux_drm_syncobj_timeline_v1_destroy(timeline->wtimeline);
+ }
inst->platform->priv->drm.SyncobjDestroy(
gbm_device_get_fd(inst->gbmdev),
--
2.51.0
++++++ 0020-Fix-building-on-FreeBSD.patch ++++++
>From 3bda68accb174e112e21f37b348cbab3da912afd Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <[email protected]>
Date: Mon, 22 Dec 2025 07:49:35 -0700
Subject: [PATCH 20/21] Fix building on FreeBSD.
FreeBSD doesn't have ETIME, so if drmSyncobjTimelineWait times out, it
will fail with ETIMEDOUT instead.
Also remove the ETIME check after calling poll(), since that function
doesn't use ETIME for anything.
---
src/wayland/wayland-swapchain.c | 2 +-
src/wayland/wayland-swapchain.h | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/wayland/wayland-swapchain.c b/src/wayland/wayland-swapchain.c
index 58eacd5..dec28d3 100644
--- a/src/wayland/wayland-swapchain.c
+++ b/src/wayland/wayland-swapchain.c
@@ -705,7 +705,7 @@ static int CheckBufferReleaseImplicit(WlDisplayInstance
*inst,
}
return count;
}
- else if (ret == 0 || errno == ETIME || errno == EINTR)
+ else if (ret == 0 || errno == EINTR)
{
// Nothing freed up before the timeout, but that's not a fatal error
// here.
diff --git a/src/wayland/wayland-swapchain.h b/src/wayland/wayland-swapchain.h
index 3316a03..13996c8 100644
--- a/src/wayland/wayland-swapchain.h
+++ b/src/wayland/wayland-swapchain.h
@@ -32,6 +32,11 @@
#include "wayland-platform.h"
#include "wayland-timeline.h"
+// FreeBSD doesn't have ETIME, so the DRM calls return ETIMEDOUT instead.
+#ifndef ETIME
+#define ETIME ETIMEDOUT
+#endif
+
typedef enum
{
/**
--
2.51.0
++++++ 0021-Fix-NULL-pointer-passed-to-wl_event_queue_destroy.patch ++++++
>From f7b4c68f62efc15e6f25517a6ce370e2b0d6f48f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Do=C4=9Fukan=20Korkmazt=C3=BCrk?= <[email protected]>
Date: Fri, 9 Jan 2026 08:46:25 -0500
Subject: [PATCH 21/21] Fix NULL pointer passed to wl_event_queue_destroy
In eplWlDisplayInstanceCreate, the queue variable may remain NULL if an
error occurs before an event queue is successfully created. The cleanup
code at the done label would then pass NULL to wl_event_queue_destroy,
which does not safely handle NULL pointers.
Add a NULL check before calling wl_event_queue_destroy to prevent this.
---
src/wayland/wayland-display.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/wayland/wayland-display.c b/src/wayland/wayland-display.c
index 789f787..0907003 100644
--- a/src/wayland/wayland-display.c
+++ b/src/wayland/wayland-display.c
@@ -1127,7 +1127,10 @@ WlDisplayInstance *eplWlDisplayInstanceCreate(EplDisplay
*pdpy, EGLBoolean from_
done:
FreeDisplayRegistry(&names);
- wl_event_queue_destroy(queue);
+ if (queue != NULL)
+ {
+ wl_event_queue_destroy(queue);
+ }
free(drmNode);
if (drmFd >= 0)
{
--
2.51.0