diff options
author | Christian König <[email protected]> | 2011-07-08 12:03:13 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-07-08 12:03:13 +0200 |
commit | 2ec350ff1d9f13ec95d7b9d46f57ad9b9efcc8ea (patch) | |
tree | 64c473beacf39929a013d728b3639bdd98407f91 /src/gallium/drivers | |
parent | 7eca76952b6726be9459375dde7478a01789577e (diff) |
[g3dvl] make pipe_context mandatory for creation pipe_video_context
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r300/Makefile | 1 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_video_context.c | 38 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_video_context.h | 30 | ||||
-rw-r--r-- | src/gallium/drivers/r600/Makefile | 1 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_video_context.c | 44 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_video_context.h | 9 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_screen.c | 11 |
9 files changed, 20 insertions, 134 deletions
diff --git a/src/gallium/drivers/r300/Makefile b/src/gallium/drivers/r300/Makefile index dfedf353877..4088216adcb 100644 --- a/src/gallium/drivers/r300/Makefile +++ b/src/gallium/drivers/r300/Makefile @@ -26,7 +26,6 @@ C_SOURCES = \ r300_texture.c \ r300_texture_desc.c \ r300_tgsi_to_rc.c \ - r300_video_context.c \ r300_transfer.c LIBRARY_INCLUDES = \ diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 53437d3ad08..854fc39e014 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -25,6 +25,7 @@ #include "util/u_format_s3tc.h" #include "util/u_memory.h" #include "os/os_time.h" +#include "vl/vl_context.h" #include "vl/vl_video_buffer.h" #include "r300_context.h" @@ -32,7 +33,6 @@ #include "r300_screen_buffer.h" #include "r300_state_inlines.h" #include "r300_public.h" -#include "r300_video_context.h" #include "draw/draw_context.h" @@ -425,6 +425,14 @@ static boolean r300_is_format_supported(struct pipe_screen* screen, return retval == usage; } +static struct pipe_video_context * +r300_video_create(struct pipe_screen *screen, struct pipe_context *pipe, void *priv) +{ + assert(screen); + + return vl_create_context(pipe); +} + static void r300_destroy_screen(struct pipe_screen* pscreen) { struct r300_screen* r300screen = r300_screen(pscreen); diff --git a/src/gallium/drivers/r300/r300_video_context.c b/src/gallium/drivers/r300/r300_video_context.c deleted file mode 100644 index 697e45a5745..00000000000 --- a/src/gallium/drivers/r300/r300_video_context.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2009-2010 Advanced Micro Devices, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include <vl/vl_context.h> -#include <util/u_video.h> -#include "r300_video_context.h" - -struct pipe_video_context * -r300_video_create(struct pipe_screen *screen, void *priv) -{ - struct pipe_context *pipe; - - assert(screen); - - pipe = screen->context_create(screen, priv); - if (!pipe) - return NULL; - - return vl_create_context(pipe); -} diff --git a/src/gallium/drivers/r300/r300_video_context.h b/src/gallium/drivers/r300/r300_video_context.h deleted file mode 100644 index aaae14cec47..00000000000 --- a/src/gallium/drivers/r300/r300_video_context.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2009-2010 Advanced Micro Devices, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef __R300_VIDEO_CONTEXT_H__ -#define __R300_VIDEO_CONTEXT_H__ - -#include <pipe/p_video_context.h> - -struct pipe_video_context * -r300_video_create(struct pipe_screen *screen, void *priv); - -#endif diff --git a/src/gallium/drivers/r600/Makefile b/src/gallium/drivers/r600/Makefile index 3dda3a6339f..7e21e3e32b1 100644 --- a/src/gallium/drivers/r600/Makefile +++ b/src/gallium/drivers/r600/Makefile @@ -16,7 +16,6 @@ C_SOURCES = \ r600_shader.c \ r600_state.c \ r600_texture.c \ - r600_video_context.c \ r700_asm.c \ evergreen_state.c \ eg_asm.c \ diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 4b923f86704..9e0b0ea3e49 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -38,6 +38,7 @@ #include <util/u_memory.h> #include <util/u_inlines.h> #include "util/u_upload_mgr.h" +#include <vl/vl_context.h> #include <vl/vl_video_buffer.h> #include "os/os_time.h" #include <pipebuffer/pb_buffer.h> @@ -47,7 +48,6 @@ #include "r600_shader.h" #include "r600_pipe.h" #include "r600_state_inlines.h" -#include "r600_video_context.h" /* * pipe_context @@ -301,6 +301,14 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void return &rctx->context; } +static struct pipe_video_context * +r600_video_create(struct pipe_screen *screen, struct pipe_context *pipe, void *priv) +{ + assert(screen && pipe); + + return vl_create_context(pipe); +} + /* * pipe_screen */ diff --git a/src/gallium/drivers/r600/r600_video_context.c b/src/gallium/drivers/r600/r600_video_context.c deleted file mode 100644 index 5f0d5f5baec..00000000000 --- a/src/gallium/drivers/r600/r600_video_context.c +++ /dev/null @@ -1,44 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Christian König - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "r600_video_context.h" -#include "util/u_video.h" -#include <vl/vl_context.h> - -struct pipe_video_context * -r600_video_create(struct pipe_screen *screen, void *priv) -{ - struct pipe_context *pipe; - - assert(screen); - - pipe = screen->context_create(screen, priv); - if (!pipe) - return NULL; - - return vl_create_context(pipe); -} diff --git a/src/gallium/drivers/r600/r600_video_context.h b/src/gallium/drivers/r600/r600_video_context.h deleted file mode 100644 index f579980bd36..00000000000 --- a/src/gallium/drivers/r600/r600_video_context.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __R600_VIDEO_CONTEXT_H__ -#define __R600_VIDEO_CONTEXT_H__ - -#include <pipe/p_video_context.h> - -struct pipe_video_context * -r600_video_create(struct pipe_screen *screen, void *priv); - -#endif diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index b978fb4f61e..2a5485209d1 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -301,18 +301,11 @@ softpipe_flush_frontbuffer(struct pipe_screen *_screen, } static struct pipe_video_context * -sp_video_create(struct pipe_screen *screen, void *priv) +sp_video_create(struct pipe_screen *screen, struct pipe_context *context, void *priv) { - struct pipe_context *pipe; - assert(screen); - pipe = screen->context_create(screen, NULL); - if (!pipe) - return NULL; - - /* TODO: Use slice buffering for softpipe when implemented, no advantage to buffering an entire picture with softpipe */ - return vl_create_context(pipe); + return vl_create_context(context); } /** |