From fd8eb634fd93e61e47599fb74513eb0ab0bb3726 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 13 Feb 2020 23:15:47 -0500 Subject: [PATCH] vbo: don't look at the second draw's count when merging 2 glBegin/End draws MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Only the first count needs to be aligned. Reviewed-by: Ian Romanick Reviewed-by: Mathias Fröhlich Part-of: --- src/mesa/vbo/vbo_exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c index 66ad8888bcd..359483949e3 100644 --- a/src/mesa/vbo/vbo_exec.c +++ b/src/mesa/vbo/vbo_exec.c @@ -198,15 +198,15 @@ vbo_can_merge_prims(const struct _mesa_prim *p0, const struct _mesa_prim *p1) return true; /* independent lines with no extra vertices */ - if (p0->mode == GL_LINES && p0->count % 2 == 0 && p1->count % 2 == 0) + if (p0->mode == GL_LINES && p0->count % 2 == 0) return true; /* independent tris */ - if (p0->mode == GL_TRIANGLES && p0->count % 3 == 0 && p1->count % 3 == 0) + if (p0->mode == GL_TRIANGLES && p0->count % 3 == 0) return true; /* independent quads */ - if (p0->mode == GL_QUADS && p0->count % 4 == 0 && p1->count % 4 == 0) + if (p0->mode == GL_QUADS && p0->count % 4 == 0) return true; return false; -- 2.30.2