summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau/output.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2012-02-25 23:34:31 +0100
committerChristian König <[email protected]>2012-03-02 13:14:21 +0100
commitf8ac7e034803a1c873bf156c012fede6d2640097 (patch)
tree2f396c39f3b69b96987ce27a04ab5b8c89b1b55b /src/gallium/state_trackers/vdpau/output.c
parent14766f820069ca987543918bce96410c481e5d20 (diff)
st/vdpau: avoid an unnessasary copy
Delay the actual mixer rendering until we really know which surface is the real destination. Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau/output.c')
-rw-r--r--src/gallium/state_trackers/vdpau/output.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c
index b2c89620d29..512ee944684 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -131,6 +131,8 @@ vlVdpOutputSurfaceDestroy(VdpOutputSurface surface)
if (!vlsurface)
return VDP_STATUS_INVALID_HANDLE;
+ vlVdpResolveDelayedRendering(vlsurface->device, NULL, NULL);
+
pipe_surface_reference(&vlsurface->surface, NULL);
pipe_sampler_view_reference(&vlsurface->sampler_view, NULL);
vl_compositor_cleanup_state(&vlsurface->cstate);
@@ -220,6 +222,8 @@ vlVdpOutputSurfacePutBitsIndexed(VdpOutputSurface surface,
if (!vlsurface)
return VDP_STATUS_INVALID_HANDLE;
+ vlVdpResolveDelayedRendering(vlsurface->device, NULL, NULL);
+
context = vlsurface->device->context;
compositor = &vlsurface->device->compositor;
cstate = &vlsurface->cstate;
@@ -463,6 +467,8 @@ vlVdpOutputSurfaceRenderOutputSurface(VdpOutputSurface destination_surface,
if (dst_vlsurface->device != src_vlsurface->device)
return VDP_STATUS_HANDLE_DEVICE_MISMATCH;
+ vlVdpResolveDelayedRendering(dst_vlsurface->device, NULL, NULL);
+
context = dst_vlsurface->device->context;
compositor = &dst_vlsurface->device->compositor;
cstate = &dst_vlsurface->cstate;