From 330d0607ed60fd3edca192e54b4246310f06652f Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 2 Apr 2017 16:24:39 +0200 Subject: 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 --- src/gallium/auxiliary/util/u_draw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gallium/auxiliary/util/u_draw.c') diff --git a/src/gallium/auxiliary/util/u_draw.c b/src/gallium/auxiliary/util/u_draw.c index e7abbfc422b..a7590f7f043 100644 --- a/src/gallium/auxiliary/util/u_draw.c +++ b/src/gallium/auxiliary/util/u_draw.c @@ -136,7 +136,7 @@ util_draw_indirect(struct pipe_context *pipe, struct pipe_draw_info info; struct pipe_transfer *transfer; uint32_t *params; - const unsigned num_params = info_in->indexed ? 5 : 4; + const unsigned num_params = info_in->index_size ? 5 : 4; assert(info_in->indirect); assert(!info_in->count_from_stream_output); @@ -158,8 +158,8 @@ util_draw_indirect(struct pipe_context *pipe, info.count = params[0]; info.instance_count = params[1]; info.start = params[2]; - info.index_bias = info_in->indexed ? params[3] : 0; - info.start_instance = info_in->indexed ? params[4] : params[3]; + info.index_bias = info_in->index_size ? params[3] : 0; + info.start_instance = info_in->index_size ? params[4] : params[3]; info.indirect = NULL; pipe_buffer_unmap(pipe, transfer); -- cgit v1.2.3