aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_pipe.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-01-07 10:35:41 +1000
committerDave Airlie <[email protected]>2011-01-07 10:35:41 +1000
commit6d9ca78ef7bf831b9b63f4bda68623cbae627508 (patch)
treedeb0c40517a37b39ac461c3d4a935a4d5298d743 /src/gallium/drivers/r600/r600_pipe.c
parent7b97bdba4096180df4e32e6c52f79713a649478b (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.c')
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c8
1 files changed, 8 insertions, 0 deletions
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);