diff --git a/src/vulkan/runtime/vk_queue.c b/src/vulkan/runtime/vk_queue.c index 64d4003184d..91c9968fdbd 100644 --- a/src/vulkan/runtime/vk_queue.c +++ b/src/vulkan/runtime/vk_queue.c @@ -642,7 +642,6 @@ vk_queue_submit(struct vk_queue *queue, vk_find_struct_const(info->pNext, PERFORMANCE_QUERY_SUBMIT_INFO_KHR); submit->perf_pass_index = perf_info ? perf_info->counterPassIndex : 0; - bool has_binary_permanent_semaphore_wait = false; for (uint32_t i = 0; i < info->wait_count; i++) { VK_FROM_HANDLE(vk_semaphore, semaphore, info->waits[i].semaphore); @@ -674,7 +673,7 @@ vk_queue_submit(struct vk_queue *queue, if (semaphore->type == VK_SEMAPHORE_TYPE_BINARY) { if (vk_device_supports_threaded_submit(device)) assert(semaphore->permanent.type->move); - has_binary_permanent_semaphore_wait = true; + submit->_has_binary_permanent_semaphore_wait = true; } sync = &semaphore->permanent; @@ -863,7 +862,7 @@ vk_queue_submit(struct vk_queue *queue, * operation. If we don't signal the vk_sync, then we need to reset it. */ if (vk_device_supports_threaded_submit(device) && - has_binary_permanent_semaphore_wait) { + submit->_has_binary_permanent_semaphore_wait) { for (uint32_t i = 0; i < submit->wait_count; i++) { if ((submit->waits[i].sync->flags & VK_SYNC_IS_TIMELINE) || submit->_wait_temps[i] != NULL) @@ -894,7 +893,7 @@ vk_queue_submit(struct vk_queue *queue, return vk_device_flush(queue->base.device); case VK_QUEUE_SUBMIT_MODE_THREADED: - if (has_binary_permanent_semaphore_wait) { + if (submit->_has_binary_permanent_semaphore_wait) { for (uint32_t i = 0; i < submit->wait_count; i++) { if (submit->waits[i].sync->flags & VK_SYNC_IS_TIMELINE) continue; diff --git a/src/vulkan/runtime/vk_queue.h b/src/vulkan/runtime/vk_queue.h index 814f9fefcdd..23e10d93659 100644 --- a/src/vulkan/runtime/vk_queue.h +++ b/src/vulkan/runtime/vk_queue.h @@ -237,6 +237,7 @@ struct vk_queue_submit { uint32_t perf_pass_index; /* Used internally; should be ignored by drivers */ + bool _has_binary_permanent_semaphore_wait; struct vk_sync **_wait_temps; struct vk_sync *_mem_signal_temp; struct vk_sync_timeline_point **_wait_points;