diff options
author | Marek Olšák <[email protected]> | 2012-07-06 03:18:06 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-07-17 21:22:14 +0200 |
commit | 585baac652ffa172fb3fbbdd4c7559d03b7c27ef (patch) | |
tree | 3985338ffda9d7a91e8126a38609802140f9ded4 /src/gallium/drivers/r600/r600_pipe.h | |
parent | f4f2e8ebe1bad91b2c4339a8280d516738bd27d2 (diff) |
r600g: do fine-grained vertex buffer updates
If only some buffers are changed, the other ones don't have to re-emitted.
This uses bitmasks of enabled and dirty buffers just like
emit_constant_buffers does.
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 6449a4d4042..200f0a2ca59 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -278,6 +278,8 @@ struct r600_constbuf_state struct r600_vertexbuf_state { struct r600_atom atom; + struct pipe_vertex_buffer vb[PIPE_MAX_ATTRIBS]; + uint32_t enabled_mask; /* non-NULL buffers */ uint32_t dirty_mask; }; @@ -399,13 +401,8 @@ struct r600_context { boolean dual_src_blend; - /* Vertex and index buffers. */ - bool vertex_buffers_dirty; + /* Index buffer. */ struct pipe_index_buffer index_buffer; - struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS]; - unsigned nr_vertex_buffers; - struct pipe_vertex_buffer cs_vertex_buffer[PIPE_MAX_ATTRIBS]; - unsigned nr_cs_vertex_buffers; }; static INLINE void r600_emit_atom(struct r600_context *rctx, struct r600_atom *atom) @@ -528,8 +525,9 @@ unsigned r600_get_cb_flush_flags(struct r600_context *rctx); void r600_texture_barrier(struct pipe_context *ctx); void r600_set_index_buffer(struct pipe_context *ctx, const struct pipe_index_buffer *ib); +void r600_vertex_buffers_dirty(struct r600_context *rctx); void r600_set_vertex_buffers(struct pipe_context *ctx, unsigned count, - const struct pipe_vertex_buffer *buffers); + const struct pipe_vertex_buffer *input); void *r600_create_vertex_elements(struct pipe_context *ctx, unsigned count, const struct pipe_vertex_element *elements); |