Mesa (main): util/prim_restart: store the total index count when rewriting draws

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 9 15:07:37 UTC 2021


Module: Mesa
Branch: main
Commit: 1627476079988c07121d9aa8a98946a063509c9b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1627476079988c07121d9aa8a98946a063509c9b

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri May 21 06:05:53 2021 -0400

util/prim_restart: store the total index count when rewriting draws

Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10966>

---

 src/gallium/auxiliary/util/u_prim_restart.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/auxiliary/util/u_prim_restart.c b/src/gallium/auxiliary/util/u_prim_restart.c
index 59be6cf5b02..f656425ecfb 100644
--- a/src/gallium/auxiliary/util/u_prim_restart.c
+++ b/src/gallium/auxiliary/util/u_prim_restart.c
@@ -178,6 +178,7 @@ struct range_info {
    struct range *ranges;
    unsigned count, max;
    unsigned min_index, max_index;
+   unsigned total_index_count;
 };
 
 
@@ -217,6 +218,7 @@ add_range(enum pipe_prim_type mode, struct range_info *info, unsigned start, uns
    info->ranges[info->count].start = start;
    info->ranges[info->count].count = count;
    info->count++;
+   info->total_index_count += count;
 
    return TRUE;
 }



More information about the mesa-commit mailing list