Mesa (master): vbo: remove dead code in vbo_can_merge_prims

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 18 22:09:08 UTC 2020


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Mon Feb 10 21:24:26 2020 -0500

vbo: remove dead code in vbo_can_merge_prims

This is only used by immediate mode and the values are immutable.

Reviewed-by: Mathias Fröhlich <mathias.froehlich at web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>

---

 src/mesa/vbo/vbo_exec.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c
index e4775ba5c12..f1b1f8bff95 100644
--- a/src/mesa/vbo/vbo_exec.c
+++ b/src/mesa/vbo/vbo_exec.c
@@ -191,10 +191,9 @@ vbo_can_merge_prims(const struct _mesa_prim *p0, const struct _mesa_prim *p1)
    if (p0->start + p0->count != p1->start)
       return false;
 
-   if (p0->basevertex != p1->basevertex ||
-       p0->num_instances != p1->num_instances ||
-       p0->base_instance != p1->base_instance)
-      return false;
+   assert(p0->basevertex == p1->basevertex &&
+          p0->num_instances == p1->num_instances &&
+          p0->base_instance == p1->base_instance);
 
    /* can always merge subsequent GL_POINTS primitives */
    if (p0->mode == GL_POINTS)



More information about the mesa-commit mailing list