From 4e837f557bf5f5afb286e1f2244ed69c0092c2d6 Mon Sep 17 00:00:00 2001 From: Christian König Date: Fri, 8 Jul 2011 16:56:11 +0200 Subject: [g3dvl] move video buffer creation out of video context --- src/gallium/drivers/r300/r300_context.c | 3 +++ src/gallium/drivers/r600/r600_pipe.c | 1 + src/gallium/drivers/softpipe/sp_context.c | 3 +++ 3 files changed, 7 insertions(+) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 0554c40eef0..7d22ffb6a94 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -27,6 +27,7 @@ #include "util/u_simple_list.h" #include "util/u_upload_mgr.h" #include "os/os_time.h" +#include "vl/vl_video_buffer.h" #include "r300_cb.h" #include "r300_context.h" @@ -436,6 +437,8 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, r300_init_query_functions(r300); r300_init_state_functions(r300); r300_init_resource_functions(r300); + + r300->context.create_video_buffer = vl_video_buffer_create; r300->vbuf_mgr = u_vbuf_mgr_create(&r300->context, 1024 * 1024, 16, PIPE_BIND_VERTEX_BUFFER | diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index b3264c5a670..d8b51ea4871 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -226,6 +226,7 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void r600_init_context_resource_functions(rctx); r600_init_surface_functions(rctx); rctx->context.draw_vbo = r600_draw_vbo; + rctx->context.create_video_buffer = vl_video_buffer_create; switch (r600_get_family(rctx->radeon)) { case CHIP_R600: diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index ce22f646228..0e623944e59 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -37,6 +37,7 @@ #include "util/u_memory.h" #include "util/u_inlines.h" #include "tgsi/tgsi_exec.h" +#include "vl/vl_video_buffer.h" #include "sp_clear.h" #include "sp_context.h" #include "sp_flush.h" @@ -258,6 +259,8 @@ softpipe_create_context( struct pipe_screen *screen, softpipe->pipe.flush = softpipe_flush_wrapped; softpipe->pipe.render_condition = softpipe_render_condition; + + softpipe->pipe.create_video_buffer = vl_video_buffer_create; /* * Alloc caches for accessing drawing surfaces and textures. -- cgit v1.2.3