From: Grigori Goronzy Date: Tue, 5 Nov 2013 23:35:31 +0000 (+0100) Subject: st/vdpau: resolve delayed rendering for GL interop v2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5580ff818e0559099ffc79af60872908e9d5d747;p=mesa.git st/vdpau: resolve delayed rendering for GL interop v2 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 --- 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; }