Mesa (master): gallium/u_vbuf: adjust the heuristic for unrolling indices

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 14 23:52:33 UTC 2020


Module: Mesa
Branch: master
Commit: cf86f522b255a5603176ec361cb0cfcc2416a41d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf86f522b255a5603176ec361cb0cfcc2416a41d

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Mon Jan 20 19:57:05 2020 -0500

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 <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>

---

 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 &



More information about the mesa-commit mailing list