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/auxiliary/cso_cache | |
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/auxiliary/cso_cache')
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_context.c | 16 | ||||
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_context.h | 4 |
2 files changed, 0 insertions, 20 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 68f7b9e7bfe..5558385e4c2 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -349,8 +349,6 @@ void cso_destroy_context( struct cso_context *ctx ) unsigned i; if (ctx->pipe) { - ctx->pipe->set_index_buffer(ctx->pipe, NULL); - ctx->pipe->bind_blend_state( ctx->pipe, NULL ); ctx->pipe->bind_rasterizer_state( ctx->pipe, NULL ); @@ -1697,20 +1695,6 @@ cso_restore_state(struct cso_context *cso) /* drawing */ void -cso_set_index_buffer(struct cso_context *cso, - const struct pipe_index_buffer *ib) -{ - struct u_vbuf *vbuf = cso->vbuf; - - if (vbuf) { - u_vbuf_set_index_buffer(vbuf, ib); - } else { - struct pipe_context *pipe = cso->pipe; - pipe->set_index_buffer(pipe, ib); - } -} - -void cso_draw_vbo(struct cso_context *cso, const struct pipe_draw_info *info) { diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h index 742bbb516f1..c21e83849ef 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.h +++ b/src/gallium/auxiliary/cso_cache/cso_context.h @@ -222,10 +222,6 @@ void cso_restore_constant_buffer_slot0(struct cso_context *cso, /* drawing */ void -cso_set_index_buffer(struct cso_context *cso, - const struct pipe_index_buffer *ib); - -void cso_draw_vbo(struct cso_context *cso, const struct pipe_draw_info *info); |