mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
anv/trtt: add support for queue->sync to the TR-TT batches
At this moment this patch won't buy us anything since we're already being completely synchronous, but the next patch is going to change this and so queue->sync will start making sense. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25512>
This commit is contained in:
parent
1534ee46b8
commit
0f21836272
2 changed files with 26 additions and 0 deletions
|
|
@ -1020,6 +1020,14 @@ i915_execute_trtt_batch(struct anv_sparse_submission *submit,
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (queue->sync) {
|
||||
result = anv_execbuf_add_sync(device, &execbuf, queue->sync,
|
||||
true /* is_signal */,
|
||||
0 /* signal_value */);
|
||||
if (result != VK_SUCCESS)
|
||||
goto out;
|
||||
}
|
||||
|
||||
result = anv_execbuf_add_bo(device, &execbuf, trtt_bbo->bo, NULL, 0);
|
||||
if (result != VK_SUCCESS)
|
||||
goto out;
|
||||
|
|
@ -1050,6 +1058,15 @@ i915_execute_trtt_batch(struct anv_sparse_submission *submit,
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (queue->sync) {
|
||||
result = vk_sync_wait(&device->vk, queue->sync, 0,
|
||||
VK_SYNC_WAIT_COMPLETE, UINT64_MAX);
|
||||
if (result != VK_SUCCESS) {
|
||||
result = vk_queue_set_lost(&queue->vk, "trtt sync wait failed");
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: we can get rid of this wait once we can properly handle the buffer
|
||||
* lifetimes.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -226,6 +226,15 @@ xe_execute_trtt_batch(struct anv_sparse_submission *submit,
|
|||
}
|
||||
}
|
||||
|
||||
if (queue->sync) {
|
||||
result = vk_sync_wait(&device->vk, queue->sync, 0,
|
||||
VK_SYNC_WAIT_COMPLETE, UINT64_MAX);
|
||||
if (result != VK_SUCCESS) {
|
||||
result = vk_queue_set_lost(&queue->vk, "trtt sync wait failed");
|
||||
goto exec_error;
|
||||
}
|
||||
}
|
||||
|
||||
/* FIXME: we shouldn't need this wait, figure out a way to remove it. */
|
||||
struct drm_syncobj_wait wait = {
|
||||
.handles = (uintptr_t)&syncobj_handle,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue