st/vdpau: really block until surface is idle
authorGrigori Goronzy <greg@chown.ath.cx>
Wed, 9 Oct 2013 00:23:52 +0000 (02:23 +0200)
committerChristian König <christian.koenig@amd.com>
Wed, 9 Oct 2013 11:02:40 +0000 (13:02 +0200)
pipe_screen::fence_finish with zero timeout returns quickly and
doesn't wait at all. Fix that, and also delete the fence afterwards,
so that QuerySurfaceStatus returns the right state later.

Addresses:
https://trac.videolan.org/vlc/ticket/9281
https://bugs.freedesktop.org/show_bug.cgi?id=68792

Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/vdpau/presentation.c

index c9f8ea70ecc5103838a17d7167757f81c3a6004b..81e0328a09610b718edadd04f12dc6dd4752f290 100644 (file)
@@ -325,7 +325,8 @@ vlVdpPresentationQueueBlockUntilSurfaceIdle(VdpPresentationQueue presentation_qu
    pipe_mutex_lock(pq->device->mutex);
    if (surf->fence) {
       screen = pq->device->vscreen->pscreen;
-      screen->fence_finish(screen, surf->fence, 0);
+      screen->fence_finish(screen, surf->fence, PIPE_TIMEOUT_INFINITE);
+      screen->fence_reference(screen, &surf->fence, NULL);
    }
    pipe_mutex_unlock(pq->device->mutex);