vbo: remove dead code in vbo_can_merge_prims
authorMarek Olšák <marek.olsak@amd.com>
Tue, 11 Feb 2020 02:24:26 +0000 (21:24 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 18 Feb 2020 21:45:34 +0000 (16:45 -0500)
This is only used by immediate mode and the values are immutable.

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

src/mesa/vbo/vbo_exec.c

index e4775ba5c12bd0e69aae1d8b2d9b9fe4c21e4b9d..f1b1f8bff955dc37351d4ad3e47bc4f9a909b87a 100644 (file)
@@ -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)