From c2f444c54db82a53f63fa7a103770ee5eedc3559 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 12 Jul 2012 19:50:28 +0000 Subject: r600g: Emit vertex buffers using the same method as constant buffers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marek Olšák --- src/gallium/drivers/r600/r600_state_common.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/r600/r600_state_common.c') diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index d95222072ca..be3d1014b6f 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -407,13 +407,18 @@ void r600_set_vertex_buffers(struct pipe_context *ctx, unsigned count, const struct pipe_vertex_buffer *buffers) { struct r600_context *rctx = (struct r600_context *)ctx; + struct r600_vertexbuf_state * state = &rctx->vertex_buffer_state; + unsigned i; util_copy_vertex_buffers(rctx->vertex_buffer, &rctx->nr_vertex_buffers, buffers, count); r600_inval_vertex_cache(rctx); - rctx->vertex_buffer_state.num_dw = (rctx->chip_class >= EVERGREEN ? 12 : 10) * + state->atom.num_dw = (rctx->chip_class >= EVERGREEN ? 12 : 10) * rctx->nr_vertex_buffers; - r600_atom_dirty(rctx, &rctx->vertex_buffer_state); + for (i = 0 ; i < rctx->nr_vertex_buffers; i++) { + state->dirty_mask |= 1 << i; + } + r600_atom_dirty(rctx, &state->atom); } void *r600_create_vertex_elements(struct pipe_context *ctx, -- cgit v1.2.3