From: Marek Olšák Date: Fri, 14 Feb 2020 04:15:47 +0000 (-0500) Subject: vbo: don't look at the second draw's count when merging 2 glBegin/End draws X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd8eb634fd93e61e47599fb74513eb0ab0bb3726;p=mesa.git vbo: don't look at the second draw's count when merging 2 glBegin/End draws Only the first count needs to be aligned. Reviewed-by: Ian Romanick Reviewed-by: Mathias Fröhlich Part-of: --- 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;