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@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5921>
(cherry picked from commit 8aa9d0acb8)
This commit is contained in:
Samuel Pitoiset 2020-07-14 22:55:04 +02:00 committed by Eric Engestrom
parent 77b1dd655d
commit 6fc1bc19ac
2 changed files with 2 additions and 2 deletions

View file

@ -1849,7 +1849,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
},

View file

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