File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -77,5 +77,26 @@ anv_queue_finish(struct anv_queue *queue)
7777VkResult
7878anv_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}
You can’t perform that action at this time.
0 commit comments