aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau/output.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-07-10 13:40:04 +0200
committerChristian König <[email protected]>2011-07-10 13:48:37 +0200
commit3d769619e2937cb4f2a036e82b396d9e53d65ba8 (patch)
tree1ff721fc64e569b9200a90bfb1e759277f9f3a2e /src/gallium/state_trackers/vdpau/output.c
parent3ed8182c76c61ae0296ac442546df142f1d75b00 (diff)
vdpau: implement VdpOutputSurfaceGetParameters
Diffstat (limited to 'src/gallium/state_trackers/vdpau/output.c')
-rw-r--r--src/gallium/state_trackers/vdpau/output.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c
index fc9e02ded47..f67d6ccff6b 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -135,7 +135,19 @@ vlVdpOutputSurfaceGetParameters(VdpOutputSurface surface,
VdpRGBAFormat *rgba_format,
uint32_t *width, uint32_t *height)
{
- return VDP_STATUS_NO_IMPLEMENTATION;
+ vlVdpOutputSurface *vlsurface;
+
+ VDPAU_MSG(VDPAU_TRACE, "[VDPAU] getting surface parameters\n");
+
+ vlsurface = vlGetDataHTAB(surface);
+ if (!vlsurface)
+ return VDP_STATUS_INVALID_HANDLE;
+
+ *rgba_format = PipeToFormatRGBA(vlsurface->sampler_view->texture->format);
+ *width = vlsurface->sampler_view->texture->width0;
+ *height = vlsurface->sampler_view->texture->height0;
+
+ return VDP_STATUS_OK;
}
VdpStatus