summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau
diff options
context:
space:
mode:
authorGrigori Goronzy <[email protected]>2013-11-06 00:35:31 +0100
committerChristian König <[email protected]>2013-11-06 08:45:57 +0100
commit5580ff818e0559099ffc79af60872908e9d5d747 (patch)
tree75a30d289b98a998974d4d5fbf270f641d074ab6 /src/gallium/state_trackers/vdpau
parent3785fe27158d1774a785b61c7cbbc90edbe0f9eb (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau')
-rw-r--r--src/gallium/state_trackers/vdpau/output.c4
1 files changed, 4 insertions, 0 deletions
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;
}