Mesa (staging/20.1): radv: fix destroying the syncobj when exporting a fence FD

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 17 14:11:14 UTC 2020


Module: Mesa
Branch: staging/20.1
Commit: 3e25713285734e3ff2439d8c5ac86a4aeb8d31ad
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3e25713285734e3ff2439d8c5ac86a4aeb8d31ad

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue Jul 14 22:55:04 2020 +0200

radv: fix destroying the syncobj when exporting a fence FD

It's invalid and the temporary syncobj was never actually destroyed.

Cc: 20.1 <mesa-stable at lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5921>
(cherry picked from commit 8aa9d0acb8ce882686eedd7d9b2bf51b035f2614)

---

 .pick_status.json            | 2 +-
 src/amd/vulkan/radv_device.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index a7a789370fe..e328bbae0eb 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -319,7 +319,7 @@
         "description": "radv: fix destroying the syncobj when exporting a fence FD",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 8253bed3d26..78fdcbc047a 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -7551,7 +7551,7 @@ VkResult radv_GetFenceFdKHR(VkDevice _device,
 		ret = device->ws->export_syncobj_to_sync_file(device->ws, syncobj_handle, pFd);
 		if (!ret) {
 			if (fence->temp_syncobj) {
-				close (fence->temp_syncobj);
+				device->ws->destroy_syncobj(device->ws, fence->temp_syncobj);
 				fence->temp_syncobj = 0;
 			} else {
 				device->ws->reset_syncobj(device->ws, syncobj_handle);



More information about the mesa-commit mailing list