From 6d9ca78ef7bf831b9b63f4bda68623cbae627508 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 7 Jan 2011 10:35:41 +1000 Subject: r600g: allow constant buffers to be user buffers. This provides an upload facility for the constant buffers since Marek's constants in user buffers changes. gears at least work on my evergreen now. Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_pipe.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gallium/drivers/r600/r600_pipe.c') diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 0bf87607b5b..20838e4d98f 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -69,6 +69,7 @@ static void r600_flush(struct pipe_context *ctx, unsigned flags, r600_context_flush(&rctx->ctx); r600_upload_flush(rctx->rupload_vb); + r600_upload_flush(rctx->rupload_const); } static void r600_destroy_context(struct pipe_context *context) @@ -88,6 +89,7 @@ static void r600_destroy_context(struct pipe_context *context) } r600_upload_destroy(rctx->rupload_vb); + r600_upload_destroy(rctx->rupload_const); if (rctx->tran.translate_cache) translate_cache_destroy(rctx->tran.translate_cache); @@ -171,6 +173,12 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void return NULL; } + rctx->rupload_const = r600_upload_create(rctx, 128 * 1024, 256); + if (rctx->rupload_const == NULL) { + r600_destroy_context(&rctx->context); + return NULL; + } + rctx->blitter = util_blitter_create(&rctx->context); if (rctx->blitter == NULL) { FREE(rctx); -- cgit v1.2.3