summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/nv50/nv50_state.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2017-04-02 16:24:39 +0200
committerMarek Olšák <marek.olsak@amd.com>2017-05-10 19:00:16 +0200
commit330d0607ed60fd3edca192e54b4246310f06652f (patch)
tree56bceba5b291ffcf42209ef1ab7ec515a8f5b666 /src/gallium/drivers/nouveau/nv50/nv50_state.c
parent22f6624ed318e8131681ec1f2e7b3a59449df412 (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/nouveau/nv50/nv50_state.c')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_state.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_state.c b/src/gallium/drivers/nouveau/nv50/nv50_state.c
index d5af6c9d1ff..a7d86b0f90c 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_state.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_state.c
@@ -1081,29 +1081,6 @@ nv50_set_vertex_buffers(struct pipe_context *pipe,
}
static void
-nv50_set_index_buffer(struct pipe_context *pipe,
- const struct pipe_index_buffer *ib)
-{
- struct nv50_context *nv50 = nv50_context(pipe);
-
- if (nv50->idxbuf.buffer)
- nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_3D_INDEX);
-
- if (ib) {
- pipe_resource_reference(&nv50->idxbuf.buffer, ib->buffer);
- nv50->idxbuf.index_size = ib->index_size;
- if (ib->buffer) {
- nv50->idxbuf.offset = ib->offset;
- BCTX_REFN(nv50->bufctx_3d, 3D_INDEX, nv04_resource(ib->buffer), RD);
- } else {
- nv50->idxbuf.user_buffer = ib->user_buffer;
- }
- } else {
- pipe_resource_reference(&nv50->idxbuf.buffer, NULL);
- }
-}
-
-static void
nv50_vertex_state_bind(struct pipe_context *pipe, void *hwcso)
{
struct nv50_context *nv50 = nv50_context(pipe);
@@ -1341,7 +1318,6 @@ nv50_init_state_functions(struct nv50_context *nv50)
pipe->bind_vertex_elements_state = nv50_vertex_state_bind;
pipe->set_vertex_buffers = nv50_set_vertex_buffers;
- pipe->set_index_buffer = nv50_set_index_buffer;
pipe->create_stream_output_target = nv50_so_target_create;
pipe->stream_output_target_destroy = nv50_so_target_destroy;