mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-22 20:30:42 +02:00
anv/trtt: decrement trtt->timeline_val when submission fails
Otherwise code such as anv_sparse_trtt_garbage_collect_batches() may end up stuck waiting forever on a timeline of a submission that failed. 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/30953>
This commit is contained in:
parent
0802bbd486
commit
acb759c44f
1 changed files with 8 additions and 7 deletions
|
|
@ -742,11 +742,6 @@ anv_sparse_bind_trtt(struct anv_device *device,
|
|||
|
||||
anv_sparse_trtt_garbage_collect_batches(device, false);
|
||||
|
||||
submit->base.signal = (struct vk_sync_signal) {
|
||||
.sync = trtt->timeline,
|
||||
.signal_value = ++trtt->timeline_val,
|
||||
};
|
||||
|
||||
/* These capacities are conservative estimations. For L1 binds the
|
||||
* number will match exactly unless we skip NULL binds due to L2 already
|
||||
* being NULL. For L3/L2 things are harder to estimate, but the resulting
|
||||
|
|
@ -832,15 +827,21 @@ anv_sparse_bind_trtt(struct anv_device *device,
|
|||
}
|
||||
}
|
||||
|
||||
submit->base.signal = (struct vk_sync_signal) {
|
||||
.sync = trtt->timeline,
|
||||
.signal_value = ++trtt->timeline_val,
|
||||
};
|
||||
|
||||
result =
|
||||
device->kmd_backend->queue_exec_async(&submit->base,
|
||||
sparse_submit->wait_count,
|
||||
sparse_submit->waits,
|
||||
sparse_submit->signal_count,
|
||||
sparse_submit->signals);
|
||||
if (result != VK_SUCCESS)
|
||||
if (result != VK_SUCCESS) {
|
||||
trtt->timeline_val--;
|
||||
goto out_add_bind;
|
||||
|
||||
}
|
||||
|
||||
list_addtail(&submit->link, &trtt->in_flight_batches);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue