From: Marek Olšák Date: Tue, 21 Jan 2020 00:57:05 +0000 (-0500) Subject: gallium/u_vbuf: adjust the heuristic for unrolling indices X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cf86f522b255a5603176ec361cb0cfcc2416a41d;p=mesa.git gallium/u_vbuf: adjust the heuristic for unrolling indices This improves performance in the first subtest of Viewperf11/Catia by 10%. Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index 30c4d18f6b6..0201dc9b2bf 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -1432,8 +1432,8 @@ void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info) * performance. */ if (!info->indirect && !new_info.primitive_restart && - num_vertices > new_info.count*2 && - num_vertices - new_info.count > 32 && + num_vertices > new_info.count * 4 && + new_info.count > 32 && !u_vbuf_mapping_vertex_buffer_blocks(mgr)) { unroll_indices = TRUE; user_vb_mask &= ~(mgr->nonzero_stride_vb_mask &