anv: make device initialization more asynchronous
With this change, the engine initialization batches are build and submitted at vkCreateDevice() but the function doesn't wait for them to complete. Instead we wait at vkDestroyDevice() or whenever another submission happens on the queue, we check whether the initialization batch has completed (without waiting) and free it if completed. Seems to be about 25% reduction time of vkCreateDevice() Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28975>
This commit is contained in:
committed by
Marge Bot
parent
729c0b54b6
commit
49d2d25e24
@@ -119,6 +119,15 @@ anv_queue_init(struct anv_device *device, struct anv_queue *queue,
|
||||
void
|
||||
anv_queue_finish(struct anv_queue *queue)
|
||||
{
|
||||
if (queue->init_submit) {
|
||||
anv_async_submit_wait(queue->init_submit);
|
||||
anv_async_submit_destroy(queue->init_submit);
|
||||
}
|
||||
if (queue->init_companion_submit) {
|
||||
anv_async_submit_wait(queue->init_companion_submit);
|
||||
anv_async_submit_destroy(queue->init_companion_submit);
|
||||
}
|
||||
|
||||
if (queue->sync)
|
||||
vk_sync_destroy(&queue->device->vk, queue->sync);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user