mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
anv/trtt: submit a separate batch in anv_trtt_init_context_state()
Having this as a separate batch was the normal behavior until
7da5b1caef ("anv: move trtt submissions over to the
anv_async_submit").
While it certainly sounds better to do everything related to TR-TT
initialization in one batch, we need to revert it back to be a
separate batch (but now using the new anv_async_submit infrastructure)
because we'll want to run this batch on every engine.
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30252>
This commit is contained in:
parent
abbb4b20f3
commit
6415027d85
1 changed files with 22 additions and 4 deletions
|
|
@ -405,9 +405,9 @@ trtt_get_page_table_bo(struct anv_device *device, struct anv_bo **bo,
|
|||
}
|
||||
|
||||
static VkResult
|
||||
anv_trtt_init_context_state(struct anv_device *device,
|
||||
struct anv_async_submit *submit)
|
||||
anv_trtt_init_context_state(struct anv_queue *queue)
|
||||
{
|
||||
struct anv_device *device = queue->device;
|
||||
struct anv_trtt *trtt = &device->trtt;
|
||||
|
||||
struct anv_bo *l3_bo;
|
||||
|
|
@ -430,8 +430,26 @@ anv_trtt_init_context_state(struct anv_device *device,
|
|||
goto fail_free_l3;
|
||||
}
|
||||
|
||||
result = anv_genX(device->info, init_trtt_context_state)(device, submit);
|
||||
|
||||
struct anv_async_submit submit;
|
||||
result = anv_async_submit_init(&submit, queue, &device->batch_bo_pool,
|
||||
false, true);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
result = anv_genX(device->info, init_trtt_context_state)(device, &submit);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail_fini_submit;
|
||||
|
||||
anv_genX(device->info, async_submit_end)(&submit);
|
||||
|
||||
result = device->kmd_backend->queue_exec_async(&submit, 0, NULL, 1,
|
||||
&submit.signal);
|
||||
|
||||
anv_async_submit_wait(&submit);
|
||||
|
||||
fail_fini_submit:
|
||||
anv_async_submit_fini(&submit);
|
||||
return result;
|
||||
|
||||
fail_free_l3:
|
||||
|
|
@ -627,7 +645,7 @@ anv_sparse_bind_trtt(struct anv_device *device,
|
|||
* submission.
|
||||
*/
|
||||
if (!trtt->l3_addr) {
|
||||
result = anv_trtt_init_context_state(device, &submit->base);
|
||||
result = anv_trtt_init_context_state(sparse_submit->queue);
|
||||
if (result != VK_SUCCESS)
|
||||
goto error_add_bind;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue