diff options
author | Dave Airlie <[email protected]> | 2010-09-17 14:01:50 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2010-09-17 15:29:31 +1000 |
commit | 0d76bb5d4c5c867155f7fb381c46018e1560b790 (patch) | |
tree | 41449f2f5ba46b87ab76a864931ce36ba738223c /src/gallium/drivers/r600/r600_state.c | |
parent | a927d0477a47e29d72e518880979e11e8c0f98e7 (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_state.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 5d6236206f7..4dcdc492fc1 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -437,6 +437,7 @@ static void r600_set_vertex_buffers(struct pipe_context *ctx, { struct r600_context *rctx = r600_context(ctx); unsigned i; + boolean any_user_buffers = FALSE; for (i = 0; i < rctx->nvertex_buffer; i++) { pipe_resource_reference(&rctx->vertex_buffer[i].buffer, NULL); @@ -444,8 +445,11 @@ static void r600_set_vertex_buffers(struct pipe_context *ctx, memcpy(rctx->vertex_buffer, buffers, sizeof(struct pipe_vertex_buffer) * count); for (i = 0; i < count; i++) { rctx->vertex_buffer[i].buffer = NULL; + if (r600_buffer_is_user_buffer(buffers[i].buffer)) + any_user_buffers = TRUE; pipe_resource_reference(&rctx->vertex_buffer[i].buffer, buffers[i].buffer); } + rctx->any_user_vbs = any_user_buffers; rctx->nvertex_buffer = count; } |