summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-04-26 11:49:14 +0200
committerChristian König <[email protected]>2011-04-26 11:49:31 +0200
commit2516a4654463322fede7cd17085dc4dbe92d324e (patch)
treed0412c070aade07c7303823a363afce101bbd6f0 /src/gallium/state_trackers/vdpau
parent67d93ea940a9cac1645ce4d6bdc78c5aad812cb6 (diff)
vdpau: implement OutputSurfaceDestroy
Diffstat (limited to 'src/gallium/state_trackers/vdpau')
-rw-r--r--src/gallium/state_trackers/vdpau/output.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c
index 8b85592b4e4..35b75ab3aa7 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -108,7 +108,21 @@ vlVdpOutputSurfaceCreate(VdpDevice device,
VdpStatus
vlVdpOutputSurfaceDestroy(VdpOutputSurface surface)
{
- return VDP_STATUS_NO_IMPLEMENTATION;
+ vlVdpOutputSurface *vlsurface;
+
+ debug_printf("[VDPAU] Destroying output surface\n");
+
+ vlsurface = vlGetDataHTAB(surface);
+ if (!vlsurface)
+ return VDP_STATUS_INVALID_HANDLE;
+
+ pipe_surface_reference(&vlsurface->surface, NULL);
+ pipe_sampler_view_reference(&vlsurface->sampler_view, NULL);
+
+ vlRemoveDataHTAB(surface);
+ FREE(vlsurface);
+
+ return VDP_STATUS_OK;
}
VdpStatus