From f265a194263bb2a3fa204947a9c98f472835f121 Mon Sep 17 00:00:00 2001 From: Christian König Date: Thu, 7 Jul 2011 22:51:45 +0200 Subject: [g3dvl] rename get_param to get_video_param and move into screen object --- src/gallium/drivers/r300/r300_screen.c | 13 +++++++++++++ src/gallium/drivers/r300/r300_video_context.c | 2 +- src/gallium/drivers/r600/r600_pipe.c | 13 +++++++++++++ src/gallium/drivers/r600/r600_video_context.c | 2 +- src/gallium/drivers/softpipe/sp_screen.c | 15 ++++++++++++++- 5 files changed, 42 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 05af2148b38..a440ecb8c39 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -303,6 +303,18 @@ static float r300_get_paramf(struct pipe_screen* pscreen, enum pipe_cap param) } } +static int r300_get_video_param(struct pipe_screen *screen, + enum pipe_video_profile profile, + enum pipe_video_cap param) +{ + switch (param) { + case PIPE_VIDEO_CAP_NPOT_TEXTURES: + return 0; + default: + return 0; + } +} + static boolean r300_is_format_supported(struct pipe_screen* screen, enum pipe_format format, enum pipe_texture_target target, @@ -508,6 +520,7 @@ struct pipe_screen* r300_screen_create(struct radeon_winsys *rws) r300screen->screen.get_param = r300_get_param; r300screen->screen.get_shader_param = r300_get_shader_param; r300screen->screen.get_paramf = r300_get_paramf; + r300screen->screen.get_video_param = r300_get_video_param; r300screen->screen.is_format_supported = r300_is_format_supported; r300screen->screen.context_create = r300_create_context; r300screen->screen.video_context_create = r300_video_create; diff --git a/src/gallium/drivers/r300/r300_video_context.c b/src/gallium/drivers/r300/r300_video_context.c index 1d5bfefb9dd..697e45a5745 100644 --- a/src/gallium/drivers/r300/r300_video_context.c +++ b/src/gallium/drivers/r300/r300_video_context.c @@ -34,5 +34,5 @@ r300_video_create(struct pipe_screen *screen, void *priv) if (!pipe) return NULL; - return vl_create_context(pipe, false); + return vl_create_context(pipe); } diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 049a4daae66..a25b6d0ff96 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -507,6 +507,18 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e } } +static int r600_get_video_param(struct pipe_screen *screen, + enum pipe_video_profile profile, + enum pipe_video_cap param) +{ + switch (param) { + case PIPE_VIDEO_CAP_NPOT_TEXTURES: + return 1; + default: + return 0; + } +} + static boolean r600_is_format_supported(struct pipe_screen* screen, enum pipe_format format, enum pipe_texture_target target, @@ -653,6 +665,7 @@ struct pipe_screen *r600_screen_create(struct radeon *radeon) rscreen->screen.get_param = r600_get_param; rscreen->screen.get_shader_param = r600_get_shader_param; rscreen->screen.get_paramf = r600_get_paramf; + rscreen->screen.get_video_param = r600_get_video_param; rscreen->screen.is_format_supported = r600_is_format_supported; rscreen->screen.context_create = r600_create_context; rscreen->screen.video_context_create = r600_video_create; diff --git a/src/gallium/drivers/r600/r600_video_context.c b/src/gallium/drivers/r600/r600_video_context.c index a0ab3475fde..5f0d5f5baec 100644 --- a/src/gallium/drivers/r600/r600_video_context.c +++ b/src/gallium/drivers/r600/r600_video_context.c @@ -40,5 +40,5 @@ r600_video_create(struct pipe_screen *screen, void *priv) if (!pipe) return NULL; - return vl_create_context(pipe, false); + return vl_create_context(pipe); } diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index ac2e65b988e..f0467e9148d 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -171,6 +171,18 @@ softpipe_get_paramf(struct pipe_screen *screen, enum pipe_cap param) } } +static int +softpipe_get_video_param(struct pipe_screen *screen, + enum pipe_video_profile profile, + enum pipe_video_cap param) +{ + switch (param) { + case PIPE_VIDEO_CAP_NPOT_TEXTURES: + return 0; + default: + return 0; + } +} /** * Query format support for creating a texture, drawing surface, etc. @@ -299,7 +311,7 @@ sp_video_create(struct pipe_screen *screen, void *priv) return NULL; /* TODO: Use slice buffering for softpipe when implemented, no advantage to buffering an entire picture with softpipe */ - return vl_create_context(pipe, true); + return vl_create_context(pipe); } /** @@ -324,6 +336,7 @@ softpipe_create_screen(struct sw_winsys *winsys) screen->base.get_param = softpipe_get_param; screen->base.get_shader_param = softpipe_get_shader_param; screen->base.get_paramf = softpipe_get_paramf; + screen->base.get_video_param = softpipe_get_video_param; screen->base.is_format_supported = softpipe_is_format_supported; screen->base.context_create = softpipe_create_context; screen->base.flush_frontbuffer = softpipe_flush_frontbuffer; -- cgit v1.2.3