From 7216e1d8afedda9dd0f8a6ab0e03274190d1c7be Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 2 Apr 2017 14:42:17 +0200 Subject: gallium: decrease the size of pipe_draw_info - 88 -> 80 bytes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle Reviewed-by: Brian Paul --- src/gallium/auxiliary/indices/u_primconvert.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/gallium/auxiliary/indices') diff --git a/src/gallium/auxiliary/indices/u_primconvert.c b/src/gallium/auxiliary/indices/u_primconvert.c index 2bdfade8a54..1ffca4b593c 100644 --- a/src/gallium/auxiliary/indices/u_primconvert.c +++ b/src/gallium/auxiliary/indices/u_primconvert.c @@ -128,12 +128,15 @@ util_primconvert_draw_vbo(struct primconvert_context *pc, new_info.primitive_restart = info->primitive_restart; new_info.restart_index = info->restart_index; if (info->indexed) { + enum pipe_prim_type mode = 0; + u_index_translator(pc->primtypes_mask, info->mode, pc->saved_ib.index_size, info->count, pc->api_pv, pc->api_pv, info->primitive_restart ? PR_ENABLE : PR_DISABLE, - &new_info.mode, &new_ib.index_size, &new_info.count, + &mode, &new_ib.index_size, &new_info.count, &trans_func); + new_info.mode = mode; src = ib->user_buffer; if (!src) { src = pipe_buffer_map(pc->pipe, ib->buffer, @@ -142,11 +145,14 @@ util_primconvert_draw_vbo(struct primconvert_context *pc, src = (const uint8_t *)src + ib->offset; } else { + enum pipe_prim_type mode = 0; + u_index_generator(pc->primtypes_mask, info->mode, info->start, info->count, pc->api_pv, pc->api_pv, - &new_info.mode, &new_ib.index_size, &new_info.count, + &mode, &new_ib.index_size, &new_info.count, &gen_func); + new_info.mode = mode; } u_upload_alloc(pc->pipe->stream_uploader, 0, new_ib.index_size * new_info.count, 4, -- cgit v1.2.3