aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_state_common.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-04-01 23:54:44 +0200
committerMarek Olšák <[email protected]>2012-04-24 01:39:22 +0200
commit23b948057ad33cf0b27e5c88a8e9ff7dbfa0573c (patch)
tree69735532c345c71839e45ba7e11fefdfe288f48c /src/gallium/drivers/r600/r600_state_common.c
parent3e3737e9e2548ae751236067cca2a79ad98dc2dd (diff)
r600g: move updating vertex buffer state into set_vertex_buffers
Diffstat (limited to 'src/gallium/drivers/r600/r600_state_common.c')
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index b32d89b6750..75f9cdf89b9 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -398,7 +398,11 @@ void r600_set_vertex_buffers(struct pipe_context *ctx, unsigned count,
struct r600_context *rctx = (struct r600_context *)ctx;
util_copy_vertex_buffers(rctx->vertex_buffer, &rctx->nr_vertex_buffers, buffers, count);
- rctx->vertex_buffers_dirty = true;
+
+ r600_inval_vertex_cache(rctx);
+ rctx->vertex_buffer_state.num_dw = (rctx->chip_class >= EVERGREEN ? 12 : 10) *
+ rctx->nr_vertex_buffers;
+ r600_atom_dirty(rctx, &rctx->vertex_buffer_state);
}
void *r600_create_vertex_elements(struct pipe_context *ctx,
@@ -760,15 +764,6 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo)
r600_update_derived_state(rctx);
- /* Update vertex buffers. */
- if (rctx->vertex_buffers_dirty) {
- r600_inval_vertex_cache(rctx);
- rctx->vertex_buffer_state.num_dw = (rctx->chip_class >= EVERGREEN ? 12 : 10) *
- rctx->nr_vertex_buffers;
- r600_atom_dirty(rctx, &rctx->vertex_buffer_state);
- rctx->vertex_buffers_dirty = FALSE;
- }
-
if (info.indexed) {
/* Initialize the index buffer struct. */
pipe_resource_reference(&ib.buffer, rctx->index_buffer.buffer);