From cf86f522b255a5603176ec361cb0cfcc2416a41d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 20 Jan 2020 19:57:05 -0500 Subject: [PATCH] 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: --- src/gallium/auxiliary/util/u_vbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 & -- 2.30.2