nvk: Reset semaphore syncs on wait

Vulkan semaphores are spec'd to auto-reset on wait but we currently
assert on signal that the state is RESET. Without this, semaphores used
more than once assert which isn't what we want.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Faith Ekstrand 2023-01-30 20:12:00 -06:00 committed by Marge Bot
parent 5b9ea2863b
commit 279d81c083

View file

@ -203,6 +203,11 @@ nvk_queue_submit_drm_nouveau(struct nvk_queue *queue,
result = push_submit(&pb, queue, sync);
if (result == VK_SUCCESS) {
for (uint32_t i = 0; i < submit->wait_count; i++) {
struct nvk_bo_sync *bo_sync =
container_of(submit->waits[i].sync, struct nvk_bo_sync, sync);
bo_sync->state = NVK_BO_SYNC_STATE_RESET;
}
for (uint32_t i = 0; i < submit->signal_count; i++) {
struct nvk_bo_sync *bo_sync =
container_of(submit->signals[i].sync, struct nvk_bo_sync, sync);