summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau
diff options
context:
space:
mode:
authorChristian König <[email protected]>2012-02-26 13:09:12 +0100
committerChristian König <[email protected]>2012-03-02 13:38:06 +0100
commit222600972c60ce987b63c6422f26b9b8da95f1b0 (patch)
tree9ff123d7ac67f0f4ba90c270ddb88536cb57f2e0 /src/gallium/state_trackers/vdpau
parent507fd8026ad2ade8bc79f5852ec20ad74503cc7f (diff)
st/vdpau: implement OutputSurfaceQueryGetPutBitsNativeCapabilities
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau')
-rw-r--r--src/gallium/state_trackers/vdpau/query.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/vdpau/query.c b/src/gallium/state_trackers/vdpau/query.c
index e9a4a0c91dc..4daf48b46b0 100644
--- a/src/gallium/state_trackers/vdpau/query.c
+++ b/src/gallium/state_trackers/vdpau/query.c
@@ -230,10 +230,32 @@ VdpStatus
vlVdpOutputSurfaceQueryGetPutBitsNativeCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format,
VdpBool *is_supported)
{
+ vlVdpDevice *dev;
+ struct pipe_screen *pscreen;
+ enum pipe_format format;
+
+ dev = vlGetDataHTAB(device);
+ if (!dev)
+ return VDP_STATUS_INVALID_HANDLE;
+
+ pscreen = dev->vscreen->pscreen;
+ if (!pscreen)
+ return VDP_STATUS_ERROR;
+
+ format = FormatRGBAToPipe(surface_rgba_format);
+ if (format == PIPE_FORMAT_NONE || format == PIPE_FORMAT_A8_UNORM)
+ return VDP_STATUS_INVALID_RGBA_FORMAT;
+
if (!is_supported)
return VDP_STATUS_INVALID_POINTER;
- return VDP_STATUS_NO_IMPLEMENTATION;
+ *is_supported = pscreen->is_format_supported
+ (
+ pscreen, format, PIPE_TEXTURE_2D, 1,
+ PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET
+ );
+
+ return VDP_STATUS_OK;
}
/**