gallium/u_vbuf: adjust the heuristic for unrolling indices
authorMarek Olšák <marek.olsak@amd.com>
Tue, 21 Jan 2020 00:57:05 +0000 (19:57 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 14 Feb 2020 23:16:27 +0000 (18:16 -0500)
This improves performance in the first subtest of Viewperf11/Catia by 10%.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>

src/gallium/auxiliary/util/u_vbuf.c

index 30c4d18f6b621bf9f134a776bb5e2bd2234c780a..0201dc9b2bf037f6f5d07c00700bfa1939d834c2 100644 (file)
@@ -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 &