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/evergreen_compute.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/evergreen_compute.c')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_compute.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c index b61ea8ff1f1..947a3283b0f 100644 --- a/src/gallium/drivers/r600/evergreen_compute.c +++ b/src/gallium/drivers/r600/evergreen_compute.c @@ -90,13 +90,15 @@ static void evergreen_cs_set_vertex_buffer( struct pipe_resource * buffer) { struct pipe_vertex_buffer *vb = &rctx->cs_vertex_buffer[vb_index]; + struct r600_vertexbuf_state * state = &rctx->cs_vertex_buffer_state; vb->stride = 1; vb->buffer_offset = offset; vb->buffer = buffer; vb->user_buffer = NULL; r600_inval_vertex_cache(rctx); - r600_atom_dirty(rctx, &rctx->cs_vertex_buffer_state); + state->dirty_mask |= 1 << vb_index; + r600_atom_dirty(rctx, &state->atom); } const struct u_resource_vtbl r600_global_buffer_vtbl = @@ -367,8 +369,8 @@ static void compute_emit_cs(struct r600_context *ctx) r600_context_pipe_state_emit(ctx, cb_state, RADEON_CP_PACKET3_COMPUTE_MODE); /* Emit vertex buffer state */ - ctx->cs_vertex_buffer_state.num_dw = 12 * ctx->nr_cs_vertex_buffers; - r600_emit_atom(ctx, &ctx->cs_vertex_buffer_state); + ctx->cs_vertex_buffer_state.atom.num_dw = 12 * ctx->nr_cs_vertex_buffers; + r600_emit_atom(ctx, &ctx->cs_vertex_buffer_state.atom); for (i = 0; i < get_compute_resource_num(); i++) { if (ctx->cs_shader->resources[i].enabled) { |