diff options
author | Christian König <[email protected]> | 2011-07-13 22:56:06 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-07-13 22:56:06 +0200 |
commit | ed24e19070b7dff12670151b2d184f31c845ccae (patch) | |
tree | 98b47585f9223ee95cbbf541e6434598d9439491 /src/gallium/drivers/nvfx | |
parent | 85e1fa55066783d2748993810708dee6db7a4993 (diff) | |
parent | a2a6799fbefc6900f2371efab778c5bc2bf5a6e9 (diff) |
Merge branch 'pipe-video'
Diffstat (limited to 'src/gallium/drivers/nvfx')
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_context.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_screen.c | 22 | ||||
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_state.h | 1 |
3 files changed, 28 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_context.c b/src/gallium/drivers/nvfx/nvfx_context.c index 98603bedde1..e2cdcf636f9 100644 --- a/src/gallium/drivers/nvfx/nvfx_context.c +++ b/src/gallium/drivers/nvfx/nvfx_context.c @@ -1,6 +1,8 @@ #include "draw/draw_context.h" #include "pipe/p_defines.h" #include "util/u_framebuffer.h" +#include "vl/vl_decoder.h" +#include "vl/vl_video_buffer.h" #include "nvfx_context.h" #include "nvfx_screen.h" @@ -88,6 +90,9 @@ nvfx_create(struct pipe_screen *pscreen, void *priv) nvfx->pipe.clear = nvfx_clear; nvfx->pipe.flush = nvfx_flush; + nvfx->pipe.create_video_decoder = vl_create_decoder; + nvfx->pipe.create_video_buffer = vl_video_buffer_create; + nvfx->is_nv4x = screen->is_nv4x; nvfx->use_nv4x = screen->use_nv4x; /* TODO: it seems that nv30 might have fixed function clipping usable with vertex programs diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c b/src/gallium/drivers/nvfx/nvfx_screen.c index 8569b5a190b..8cb6cd0938e 100644 --- a/src/gallium/drivers/nvfx/nvfx_screen.c +++ b/src/gallium/drivers/nvfx/nvfx_screen.c @@ -3,6 +3,8 @@ #include "util/u_format.h" #include "util/u_format_s3tc.h" #include "util/u_simple_screen.h" +#include "vl/vl_decoder.h" +#include "vl/vl_video_buffer.h" #include "nouveau/nouveau_screen.h" #include "nouveau/nv_object.xml.h" @@ -209,6 +211,24 @@ nvfx_screen_get_paramf(struct pipe_screen *pscreen, enum pipe_cap param) } } +static int +nvfx_screen_get_video_param(struct pipe_screen *screen, + enum pipe_video_profile profile, + enum pipe_video_cap param) +{ + switch (param) { + case PIPE_VIDEO_CAP_SUPPORTED: + return vl_profile_supported(screen, profile); + case PIPE_VIDEO_CAP_NPOT_TEXTURES: + return 0; + case PIPE_VIDEO_CAP_MAX_WIDTH: + case PIPE_VIDEO_CAP_MAX_HEIGHT: + return vl_video_buffer_max_size(screen); + default: + return 0; + } +} + static boolean nvfx_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, @@ -469,7 +489,9 @@ nvfx_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev) pscreen->get_param = nvfx_screen_get_param; pscreen->get_shader_param = nvfx_screen_get_shader_param; pscreen->get_paramf = nvfx_screen_get_paramf; + pscreen->get_video_param = nvfx_screen_get_video_param; pscreen->is_format_supported = nvfx_screen_is_format_supported; + pscreen->is_video_format_supported = vl_video_buffer_is_format_supported; pscreen->context_create = nvfx_create; ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 0, 4096, &screen->fence); diff --git a/src/gallium/drivers/nvfx/nvfx_state.h b/src/gallium/drivers/nvfx/nvfx_state.h index 8fafca1950c..15e1cbb1986 100644 --- a/src/gallium/drivers/nvfx/nvfx_state.h +++ b/src/gallium/drivers/nvfx/nvfx_state.h @@ -2,6 +2,7 @@ #define __NVFX_STATE_H__ #include "pipe/p_state.h" +#include "pipe/p_video_state.h" #include "tgsi/tgsi_scan.h" #include "nouveau/nouveau_statebuf.h" #include "util/u_dynarray.h" |