diff options
author | Marek Olšák <[email protected]> | 2017-04-02 16:24:39 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-05-10 19:00:16 +0200 |
commit | 330d0607ed60fd3edca192e54b4246310f06652f (patch) | |
tree | 56bceba5b291ffcf42209ef1ab7ec515a8f5b666 /src/gallium/drivers/radeonsi/si_state.c | |
parent | 22f6624ed318e8131681ec1f2e7b3a59449df412 (diff) |
gallium: remove pipe_index_buffer and set_index_buffer
pipe_draw_info::indexed is replaced with index_size. index_size == 0 means
non-indexed.
Instead of pipe_index_buffer::offset, pipe_draw_info::start is used.
For indexed indirect draws, pipe_draw_info::start is added to the indirect
start. This is the only case when "start" affects indirect draws.
pipe_draw_info::index is a union. Use either index::resource or
index::user depending on the value of pipe_draw_info::has_user_indices.
v2: fixes for nine, svga
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 86de578e64a..1bac07e2341 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3879,24 +3879,6 @@ static void si_set_vertex_buffers(struct pipe_context *ctx, sctx->vertex_buffers_dirty = true; } -static void si_set_index_buffer(struct pipe_context *ctx, - const struct pipe_index_buffer *ib) -{ - struct si_context *sctx = (struct si_context *)ctx; - - if (ib) { - struct pipe_resource *buf = ib->buffer; - - pipe_resource_reference(&sctx->index_buffer.buffer, buf); - memcpy(&sctx->index_buffer, ib, sizeof(*ib)); - r600_context_add_resource_size(ctx, buf); - if (buf) - r600_resource(buf)->bind_history |= PIPE_BIND_INDEX_BUFFER; - } else { - pipe_resource_reference(&sctx->index_buffer.buffer, NULL); - } -} - /* * Misc */ @@ -4051,7 +4033,6 @@ void si_init_state_functions(struct si_context *sctx) sctx->b.b.bind_vertex_elements_state = si_bind_vertex_elements; sctx->b.b.delete_vertex_elements_state = si_delete_vertex_element; sctx->b.b.set_vertex_buffers = si_set_vertex_buffers; - sctx->b.b.set_index_buffer = si_set_index_buffer; sctx->b.b.texture_barrier = si_texture_barrier; sctx->b.b.memory_barrier = si_memory_barrier; |