diff options
author | Tom Stellard <[email protected]> | 2012-07-12 19:50:28 +0000 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-07-15 02:00:27 +0200 |
commit | c2f444c54db82a53f63fa7a103770ee5eedc3559 (patch) | |
tree | 6e97fbe9a7c2d3b4d511fb2c23b1eeafd9b1bde3 /src/gallium/drivers/r600/r600_state_common.c | |
parent | 9b76ee70b2ceebb52cc5edc574df9593cbac03b3 (diff) |
r600g: Emit vertex buffers using the same method as constant buffers
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_state_common.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 9 |
1 files changed, 7 insertions, 2 deletions
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, |