summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_screen.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <[email protected]>2012-12-02 12:07:35 +0100
committerMaarten Lankhorst <[email protected]>2013-01-16 17:44:09 +0100
commit4fad211502d8fcc6a4906549e6458b3306dcc27c (patch)
treedd44ceebbaabab26d044830904abc90919a28f50 /src/gallium/drivers/nvc0/nvc0_screen.c
parent4b8af72f96825cba8519b2c381ccde42decb69d3 (diff)
nvc0: Add support for video buffer
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_screen.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_screen.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
index d491bd3cfd9..de0513baff1 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nvc0/nvc0_screen.c
@@ -63,6 +63,18 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
return (nvc0_format_table[format].usage & bindings) == bindings;
}
+static boolean
+nvc0_screen_video_supported(struct pipe_screen *screen,
+ enum pipe_format format,
+ enum pipe_video_profile profile)
+{
+ if (profile != PIPE_VIDEO_PROFILE_UNKNOWN)
+ return format == PIPE_FORMAT_NV12;
+
+ return vl_video_buffer_is_format_supported(screen, format, profile);
+}
+
+
static int
nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
{
@@ -446,7 +458,8 @@ nvc0_screen_create(struct nouveau_device *dev)
nvc0_screen_init_resource_functions(pscreen);
- nouveau_screen_init_vdec(&screen->base);
+ screen->base.base.get_video_param = nvc0_screen_get_video_param;
+ screen->base.base.is_video_format_supported = nvc0_screen_video_supported;
ret = nouveau_bo_new(dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0, 4096, NULL,
&screen->fence.bo);