From 2516a4654463322fede7cd17085dc4dbe92d324e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Tue, 26 Apr 2011 11:49:14 +0200 Subject: [PATCH] vdpau: implement OutputSurfaceDestroy --- src/gallium/state_trackers/vdpau/output.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 -- 2.30.2