summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_draw.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-09-17 14:01:50 +1000
committerDave Airlie <[email protected]>2010-09-17 15:29:31 +1000
commit0d76bb5d4c5c867155f7fb381c46018e1560b790 (patch)
tree41449f2f5ba46b87ab76a864931ce36ba738223c /src/gallium/drivers/r600/r600_draw.c
parenta927d0477a47e29d72e518880979e11e8c0f98e7 (diff)
r600g: add upload manager support.
this add support for the upload manager for uploading user vbo/index buffers. this provides a considerable speedup in q3 type games.
Diffstat (limited to 'src/gallium/drivers/r600/r600_draw.c')
-rw-r--r--src/gallium/drivers/r600/r600_draw.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_draw.c b/src/gallium/drivers/r600/r600_draw.c
index 669c9b4cdb6..5480ca002d2 100644
--- a/src/gallium/drivers/r600/r600_draw.c
+++ b/src/gallium/drivers/r600/r600_draw.c
@@ -126,6 +126,11 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
memset(&draw, 0, sizeof(draw));
+ if (rctx->any_user_vbs) {
+ r600_upload_user_buffers(rctx);
+ rctx->any_user_vbs = false;
+ }
+
draw.ctx = ctx;
draw.mode = info->mode;
draw.start = info->start;
@@ -139,8 +144,7 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
assert(rctx->index_buffer.offset %
rctx->index_buffer.index_size == 0);
- draw.start += rctx->index_buffer.offset /
- rctx->index_buffer.index_size;
+ r600_upload_index_buffer(rctx, &draw);
}
else {
draw.index_size = 0;