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/vc4/vc4_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/vc4/vc4_state.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_state.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c index 2e00104e459..fe339462308 100644 --- a/src/gallium/drivers/vc4/vc4_state.c +++ b/src/gallium/drivers/vc4/vc4_state.c @@ -302,24 +302,6 @@ vc4_set_vertex_buffers(struct pipe_context *pctx, } static void -vc4_set_index_buffer(struct pipe_context *pctx, - const struct pipe_index_buffer *ib) -{ - struct vc4_context *vc4 = vc4_context(pctx); - - if (ib) { - pipe_resource_reference(&vc4->indexbuf.buffer, ib->buffer); - vc4->indexbuf.index_size = ib->index_size; - vc4->indexbuf.offset = ib->offset; - vc4->indexbuf.user_buffer = ib->user_buffer; - } else { - pipe_resource_reference(&vc4->indexbuf.buffer, NULL); - } - - vc4->dirty |= VC4_DIRTY_INDEXBUF; -} - -static void vc4_blend_state_bind(struct pipe_context *pctx, void *hwcso) { struct vc4_context *vc4 = vc4_context(pctx); @@ -670,7 +652,6 @@ vc4_state_init(struct pipe_context *pctx) pctx->set_viewport_states = vc4_set_viewport_states; pctx->set_vertex_buffers = vc4_set_vertex_buffers; - pctx->set_index_buffer = vc4_set_index_buffer; pctx->create_blend_state = vc4_create_blend_state; pctx->bind_blend_state = vc4_blend_state_bind; |