Module: Mesa
Branch: main
Commit: 5a52cfd88bbbe83c580ab059f528a9c44354ec42
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5a52cfd88bbbe83c580ab059f528a9c44354ec42

Author: Lionel Landwerlin <[email protected]>
Date:   Fri Apr 22 16:59:17 2022 +0300

anv: fix INTEL_DEBUG=sync

Signed-off-by: Lionel Landwerlin <[email protected]>
Fixes: 3684012770b2 ("anv: implement DEBUG_SYNC")
Reviewed-by: Marcin Ĺšlusarz <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16101>

---

 src/intel/vulkan/anv_queue.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c
index ffdd111686d..2cada846753 100644
--- a/src/intel/vulkan/anv_queue.c
+++ b/src/intel/vulkan/anv_queue.c
@@ -45,8 +45,10 @@ anv_queue_init(struct anv_device *device, struct anv_queue 
*queue,
       result = vk_sync_create(&device->vk,
                               &device->physical->sync_syncobj_type,
                               0, 0, &queue->sync);
-      vk_queue_finish(&queue->vk);
-      return result;
+      if (result != VK_SUCCESS) {
+         vk_queue_finish(&queue->vk);
+         return result;
+      }
    }
 
    queue->vk.driver_submit = anv_queue_submit;

Reply via email to