Skip to content

Commit e21507a

Browse files
hasvk: Ensure the queue is flushed before waiting.
Fallout: New Vegas hangs due to fence timeout on DXVK 1.10.2.
1 parent f056c1e commit e21507a

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/intel/vulkan_hasvk/anv_queue.c

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,26 @@ anv_queue_finish(struct anv_queue *queue)
7777
VkResult
7878
anv_QueueWaitIdle(VkQueue _queue)
7979
{
80-
return vk_common_QueueWaitIdle(_queue);
80+
VK_FROM_HANDLE(anv_queue, queue, _queue);
81+
struct anv_device *device = queue->device;
82+
83+
if (vk_device_is_lost(&device->vk))
84+
return VK_ERROR_DEVICE_LOST;
85+
86+
/* Flush any pending work in the queue */
87+
VkResult result = vk_device_flush(&device->vk);
88+
if (result != VK_SUCCESS)
89+
return result;
90+
91+
/* Now we wait */
92+
result = vk_common_QueueWaitIdle(_queue);
93+
if (result != VK_SUCCESS)
94+
return result;
95+
96+
/* Check device status after waiting */
97+
VkResult device_status = vk_device_check_status(&device->vk);
98+
if (device_status != VK_SUCCESS)
99+
return device_status;
100+
101+
return VK_SUCCESS;
81102
}

0 commit comments

Comments
 (0)