summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau/output.c
diff options
context:
space:
mode:
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