Mesa (staging/21.3): radv: Skip wait timeline ioctl with 0 handles.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 29 15:44:57 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: 5ab1e43760e5a9004bce9b22ec06b511b233213a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ab1e43760e5a9004bce9b22ec06b511b233213a

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Sun Dec 12 01:01:55 2021 +0100

radv: Skip wait timeline ioctl with 0 handles.

Fixes: 55d8022878f "radv: Add winsys functions for timeline syncobj."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14165>
(cherry picked from commit 20b51cdabe76461c86bdc1d37721d023da3a0f0d)

---

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

diff --git a/.pick_status.json b/.pick_status.json
index b95f71d4009..f2159e2a5a9 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -85,7 +85,7 @@
         "description": "radv: Skip wait timeline ioctl with 0 handles.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "55d8022878fd11093c861a6386734f88454f21b1"
     },
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index c2539fe5785..4f041eb9bad 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -4853,8 +4853,12 @@ wait_for_submission_timelines_available(struct radv_deferred_queue_submission *s
       points[syncobj_idx] = submission->wait_values[i];
       ++syncobj_idx;
    }
-   bool success = device->ws->wait_timeline_syncobj(device->ws, syncobj, points, syncobj_idx, true,
-                                                    true, timeout);
+
+   bool success = true;
+   if (syncobj_idx > 0) {
+      success = device->ws->wait_timeline_syncobj(device->ws, syncobj, points, syncobj_idx, true,
+                                                  true, timeout);
+   }
 
    free(points);
    return success ? VK_SUCCESS : VK_TIMEOUT;



More information about the mesa-commit mailing list