From 5580ff818e0559099ffc79af60872908e9d5d747 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Wed, 6 Nov 2013 00:35:31 +0100 Subject: st/vdpau: resolve delayed rendering for GL interop v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise OutputSurface interop has funny results sometimes. This fixes interop with the mpv media player. v2 (chk): add proper locking Signed-off-by: Christian König --- src/gallium/state_trackers/vdpau/output.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium') diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c index def01c89d2a..e4e1433eeaa 100644 --- a/src/gallium/state_trackers/vdpau/output.c +++ b/src/gallium/state_trackers/vdpau/output.c @@ -734,5 +734,9 @@ struct pipe_resource *vlVdpOutputSurfaceGallium(VdpOutputSurface surface) if (!vlsurface || !vlsurface->surface) return NULL; + pipe_mutex_lock(vlsurface->device->mutex); + vlVdpResolveDelayedRendering(vlsurface->device, NULL, NULL); + pipe_mutex_unlock(vlsurface->device->mutex); + return vlsurface->surface->texture; } -- cgit v1.2.3