From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1512086-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 2D28A15ACFB
	for <garchives@archives.gentoo.org>; Thu, 27 Apr 2023 06:20:11 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 44400E0885;
	Thu, 27 Apr 2023 06:20:10 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 0A028E0885
	for <gentoo-commits@lists.gentoo.org>; Thu, 27 Apr 2023 06:20:10 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id C66E3335D87
	for <gentoo-commits@lists.gentoo.org>; Thu, 27 Apr 2023 06:20:08 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D488A4C
	for <gentoo-commits@lists.gentoo.org>; Thu, 27 Apr 2023 06:20:07 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1682576361.0f794d735103f871e077a6e645eb387513e6ef79.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-libs/mesa/Manifest media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings-2.patch media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings.patch media-libs/mesa/mesa-23.0.2-r1.ebuild media-libs/mesa/mesa-23.0.3-r1.ebuild media-libs/mesa/mesa-23.0.3.ebuild
X-VCS-Directories: media-libs/mesa/files/ media-libs/mesa/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 0f794d735103f871e077a6e645eb387513e6ef79
X-VCS-Branch: master
Date: Thu, 27 Apr 2023 06:20:07 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 24d63acf-085b-400d-ab59-9a2e0039b74a
X-Archives-Hash: 3670a2c0207a8e5577973663342e4bdd

commit:     0f794d735103f871e077a6e645eb387513e6ef79
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 11 18:15:01 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 27 06:19:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f794d73

media-libs/mesa: backport wayland warning patches again

See 9d79f611e3930455eafc5b80cf9b2fb71aeb20b0.

Closes: https://bugs.gentoo.org/905146
Bug: https://bugs.gentoo.org/904072
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/mesa/Manifest                           |  1 +
 .../mesa-23.0.2-wayland-crash-warnings-2.patch     | 49 ++++++++++++++++++++++
 .../files/mesa-23.0.2-wayland-crash-warnings.patch | 37 ++++++++++++++++
 .../{mesa-23.0.3.ebuild => mesa-23.0.2-r1.ebuild}  |  6 ++-
 .../{mesa-23.0.3.ebuild => mesa-23.0.3-r1.ebuild}  |  5 +++
 5 files changed, 97 insertions(+), 1 deletion(-)

diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
index 6d35e3451cae..6d6f8a855f1a 100644
--- a/media-libs/mesa/Manifest
+++ b/media-libs/mesa/Manifest
@@ -1,2 +1,3 @@
 DIST mesa-22.3.7.tar.xz 17136476 BLAKE2B 291e94302d3a177f842def9339d1ba012bf10de792b7120985255168faac6b87a73d1d59d8b430f56ea2a2640ca0890a5c3721188b70c528b9aad9788d7e139d SHA512 c37bbcb3c0be1908726d6f83bfe98126d681935e401e03946e8b540611f832d2f272a2ac470600c2b77caa5b9a3a9059eb34bd9a93fcf88df114bedf8c39bf5a
+DIST mesa-23.0.2.tar.xz 17595964 BLAKE2B 5a90fcd8b7096dde1e6c82b9bb5b00622cc1cf35e4308419441d3489d66ed322843db89f2f1162c8c30f6bcddbce867447f83425a29145bd42a742b773ec1258 SHA512 c60c47d9430870ce1888018c8d887538ffc18cceaaff8649b6d38207bad873bcf7b37182675cfb0d1d7bfc589c605d7aca3f80c925d983efbd5d03cdbdcf881b
 DIST mesa-23.0.3.tar.xz 17627728 BLAKE2B e716d9ddce3da649239c1bc37ec208b9669f316f6b547ca0c69937043f371f0d59ead34fec427297171916045061ddb8783d126f6dec5ece90a0719003fe2c40 SHA512 52c778de61daa406c6a1e96a657e9b6fdcc71c8cfda80b7f53acc6470556c7d502c057b9481bb0c3d57ef0263263413fd0d25d53ebf5aa0246fbcc3309de64ae

diff --git a/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings-2.patch b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings-2.patch
new file mode 100644
index 000000000000..5992583a1fa0
--- /dev/null
+++ b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings-2.patch
@@ -0,0 +1,49 @@
+https://bugs.gentoo.org/904072
+https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21647
+
+From 689ce66a4332524b4eb98877de6f75d05dd05c60 Mon Sep 17 00:00:00 2001
+From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Date: Thu, 2 Mar 2023 10:10:42 +0200
+Subject: [PATCH] vulkan/wsi/wayland: Fix destruction of event queue with
+ proxies still attached.
+
+Destroy the surface dmabuf feedback proxy before destroying the event
+queue that the proxy is attached to.
+
+This silences a warning that libwayland 1.22 emits for programs that use
+Vulkan/Wayland:
+
+warning: queue 0x557a4efbcf70 destroyed while proxies still attached:
+  zwp_linux_dmabuf_feedback_v1@18 still attached
+
+Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21647>
+--- a/src/vulkan/wsi/wsi_common_wayland.c
++++ b/src/vulkan/wsi/wsi_common_wayland.c
+@@ -1157,18 +1157,18 @@ wsi_wl_surface_destroy(VkIcdSurfaceBase *icd_surface, VkInstance _instance,
+    struct wsi_wl_surface *wsi_wl_surface =
+       wl_container_of((VkIcdSurfaceWayland *)icd_surface, wsi_wl_surface, base);
+ 
+-   if (wsi_wl_surface->surface)
+-      wl_proxy_wrapper_destroy(wsi_wl_surface->surface);
+-
+-   if (wsi_wl_surface->display)
+-      wsi_wl_display_destroy(wsi_wl_surface->display);
+-
+    if (wsi_wl_surface->wl_dmabuf_feedback) {
+       zwp_linux_dmabuf_feedback_v1_destroy(wsi_wl_surface->wl_dmabuf_feedback);
+       dmabuf_feedback_fini(&wsi_wl_surface->dmabuf_feedback);
+       dmabuf_feedback_fini(&wsi_wl_surface->pending_dmabuf_feedback);
+    }
+ 
++   if (wsi_wl_surface->surface)
++      wl_proxy_wrapper_destroy(wsi_wl_surface->surface);
++
++   if (wsi_wl_surface->display)
++      wsi_wl_display_destroy(wsi_wl_surface->display);
++
+    vk_free2(&instance->alloc, pAllocator, wsi_wl_surface);
+ }
+ 
+-- 
+GitLab

diff --git a/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings.patch b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings.patch
new file mode 100644
index 000000000000..537d070c091e
--- /dev/null
+++ b/media-libs/mesa/files/mesa-23.0.2-wayland-crash-warnings.patch
@@ -0,0 +1,37 @@
+https://bugs.gentoo.org/904072
+https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21646
+
+From ee5d2250fd159689aae3f7d632a6226971bea85c Mon Sep 17 00:00:00 2001
+From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Date: Thu, 2 Mar 2023 09:35:08 +0200
+Subject: [PATCH] egl/wayland: Fix destruction of event queue with proxies
+ still attached.
+
+Destroy the display wrapper proxy before destroying the event queue that
+the proxy is attached to.
+
+This silences a warning that libwayland 1.22 emits for programs that use
+EGL/Wayland:
+
+warning: queue 0x562a5ed2cd20 destroyed while proxies still attached:
+  wl_display@1 still attached
+
+Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21646>
+--- a/src/egl/drivers/dri2/platform_wayland.c
++++ b/src/egl/drivers/dri2/platform_wayland.c
+@@ -2865,10 +2865,10 @@ dri2_teardown_wayland(struct dri2_egl_display *dri2_dpy)
+       wl_shm_destroy(dri2_dpy->wl_shm);
+    if (dri2_dpy->wl_registry)
+       wl_registry_destroy(dri2_dpy->wl_registry);
+-   if (dri2_dpy->wl_queue)
+-      wl_event_queue_destroy(dri2_dpy->wl_queue);
+    if (dri2_dpy->wl_dpy_wrapper)
+       wl_proxy_wrapper_destroy(dri2_dpy->wl_dpy_wrapper);
++   if (dri2_dpy->wl_queue)
++      wl_event_queue_destroy(dri2_dpy->wl_queue);
+ 
+    if (dri2_dpy->own_device)
+       wl_display_disconnect(dri2_dpy->wl_dpy);
+-- 
+GitLab

diff --git a/media-libs/mesa/mesa-23.0.3.ebuild b/media-libs/mesa/mesa-23.0.2-r1.ebuild
similarity index 98%
copy from media-libs/mesa/mesa-23.0.3.ebuild
copy to media-libs/mesa/mesa-23.0.2-r1.ebuild
index 1d4bb730495f..fa2f20039d30 100644
--- a/media-libs/mesa/mesa-23.0.3.ebuild
+++ b/media-libs/mesa/mesa-23.0.2-r1.ebuild
@@ -43,7 +43,6 @@ REQUIRED_USE="
 	video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
 	video_cards_r300?   ( x86? ( llvm ) amd64? ( llvm ) )
 	video_cards_radeonsi?   ( llvm )
-	vdpau? ( X )
 	xa? ( X )
 	zink? ( vulkan )
 "
@@ -206,6 +205,11 @@ x86? (
 	usr/lib/libGLX_mesa.so.0.0.0
 )"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-23.0.2-wayland-crash-warnings.patch
+	"${FILESDIR}"/${PN}-23.0.2-wayland-crash-warnings-2.patch
+)
+
 llvm_check_deps() {
 	local flags=${MULTILIB_USEDEP}
 	if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi

diff --git a/media-libs/mesa/mesa-23.0.3.ebuild b/media-libs/mesa/mesa-23.0.3-r1.ebuild
similarity index 98%
rename from media-libs/mesa/mesa-23.0.3.ebuild
rename to media-libs/mesa/mesa-23.0.3-r1.ebuild
index 1d4bb730495f..767e5341ebf6 100644
--- a/media-libs/mesa/mesa-23.0.3.ebuild
+++ b/media-libs/mesa/mesa-23.0.3-r1.ebuild
@@ -206,6 +206,11 @@ x86? (
 	usr/lib/libGLX_mesa.so.0.0.0
 )"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-23.0.2-wayland-crash-warnings.patch
+	"${FILESDIR}"/${PN}-23.0.2-wayland-crash-warnings-2.patch
+)
+
 llvm_check_deps() {
 	local flags=${MULTILIB_USEDEP}
 	if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi