nvk: Don't use WAIT_AVAILABLE in nvk_upload_queue_sync

This was a copy+paste error, probably from vk_drm_syncobj.c.  If we do
WAIT_AVAILABLE, it only waits for the dma_fence to exist, not for it to
signal.  Instead, we want WAIT_FOR_SUBMIT.  (Technically, that's not
necessary but it is typical for CPU waits to also wait for the time
point to materialize.)

Fixes: 2074e28a0d ("nvk: Add an upload queue")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27757>
This commit is contained in:
Faith Ekstrand 2024-02-22 19:53:04 -06:00 committed by Marge Bot
parent 6767ad9c86
commit f890b515ef

View file

@ -198,7 +198,7 @@ nvk_upload_queue_sync_locked(struct nvk_device *dev,
int err = drmSyncobjTimelineWait(dev->ws_dev->fd, &queue->drm.syncobj,
&queue->last_time_point, 1, INT64_MAX,
DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE,
DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT,
NULL);
if (err != 0)
return vk_device_set_lost(&dev->vk, "DRM_IOCTL_SYNCOBJ_WAIT failed: %m");