From 0ed0bf06961677906c7e2c5250935148dcd9e860 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 9 Jul 2014 04:00:53 +0200 Subject: radeonsi: move vertex buffer descriptors from IB to memory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This removes the intermediate storage (pm4 state) and generates descriptors directly in a staging buffer. It also reduces the number of flushes, because the descriptors no longer take CS space. Reviewed-by: Michel Dänzer --- src/gallium/drivers/radeonsi/si_state.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/radeonsi/si_state.h') diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h index a765e243ce6..82bea790cff 100644 --- a/src/gallium/drivers/radeonsi/si_state.h +++ b/src/gallium/drivers/radeonsi/si_state.h @@ -72,6 +72,7 @@ struct si_vertex_element { unsigned count; uint32_t rsrc_word3[PIPE_MAX_ATTRIBS]; + uint32_t format_size[PIPE_MAX_ATTRIBS]; struct pipe_vertex_element elements[PIPE_MAX_ATTRIBS]; }; @@ -97,7 +98,6 @@ union si_state { struct si_pm4_state *vs; struct si_pm4_state *ps; struct si_pm4_state *spi; - struct si_pm4_state *vertex_buffers; struct si_pm4_state *draw_info; struct si_pm4_state *draw; } named; @@ -147,6 +147,7 @@ struct si_descriptors { /* The buffer where resource descriptors are stored. */ struct r600_resource *buffer; + unsigned buffer_offset; /* The i-th bit is set if that element is dirty (changed but not emitted). */ unsigned dirty_mask; @@ -221,6 +222,7 @@ struct si_buffer_resources { /* si_descriptors.c */ void si_set_sampler_descriptors(struct si_context *sctx, unsigned shader, unsigned start, unsigned count, void **states); +void si_update_vertex_buffers(struct si_context *sctx); void si_set_ring_buffer(struct pipe_context *ctx, uint shader, uint slot, struct pipe_constant_buffer *input, unsigned stride, unsigned num_records, -- cgit v1.2.3