diff options
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 8 |
4 files changed, 10 insertions, 8 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index a26b44516f9..3b437bad325 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -1713,8 +1713,8 @@ static void evergreen_emit_db_misc_state(struct r600_context *rctx, struct r600_ static void evergreen_emit_vertex_buffers(struct r600_context *rctx, struct r600_atom *atom) { struct radeon_winsys_cs *cs = rctx->cs; - struct pipe_vertex_buffer *vb = rctx->vbuf_mgr->real_vertex_buffer; - unsigned count = rctx->vbuf_mgr->nr_real_vertex_buffers; + struct pipe_vertex_buffer *vb = rctx->vertex_buffer; + unsigned count = rctx->nr_vertex_buffers; unsigned i; uint64_t va; diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index e49fbdf898a..dfc93d1ff70 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -355,6 +355,8 @@ struct r600_context { unsigned color0_format; struct pipe_index_buffer index_buffer; + struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS]; + unsigned nr_vertex_buffers; }; static INLINE void r600_emit_atom(struct r600_context *rctx, struct r600_atom *atom) diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 9d3197419e5..2498196fd5e 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -1692,8 +1692,8 @@ static void r600_emit_db_misc_state(struct r600_context *rctx, struct r600_atom static void r600_emit_vertex_buffers(struct r600_context *rctx, struct r600_atom *atom) { struct radeon_winsys_cs *cs = rctx->cs; - struct pipe_vertex_buffer *vb = rctx->vbuf_mgr->real_vertex_buffer; - unsigned count = rctx->vbuf_mgr->nr_real_vertex_buffers; + struct pipe_vertex_buffer *vb = rctx->vertex_buffer; + unsigned count = rctx->nr_vertex_buffers; unsigned i, offset; for (i = 0; i < count; i++) { diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index a2cf05def17..864996d006f 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -400,7 +400,7 @@ void r600_set_vertex_buffers(struct pipe_context *ctx, unsigned count, { struct r600_context *rctx = (struct r600_context *)ctx; - u_vbuf_set_vertex_buffers(rctx->vbuf_mgr, count, buffers); + util_copy_vertex_buffers(rctx->vertex_buffer, &rctx->nr_vertex_buffers, buffers, count); rctx->vertex_buffers_dirty = true; } @@ -766,11 +766,11 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo) r600_update_derived_state(rctx); /* Update vertex buffers. */ - if ((u_vbuf_draw_begin(rctx->vbuf_mgr, &info) & U_VBUF_BUFFERS_UPDATED) || - rctx->vertex_buffers_dirty) { + u_vbuf_draw_begin(rctx->vbuf_mgr, &info); + if (rctx->vertex_buffers_dirty) { r600_inval_vertex_cache(rctx); rctx->vertex_buffer_state.num_dw = (rctx->chip_class >= EVERGREEN ? 12 : 10) * - rctx->vbuf_mgr->nr_real_vertex_buffers; + rctx->nr_vertex_buffers; r600_atom_dirty(rctx, &rctx->vertex_buffer_state); rctx->vertex_buffers_dirty = FALSE; } |