From dc9645be67d62b9147640909fbef6b418881d93c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 28 Jan 2021 16:15:40 -0500 Subject: [PATCH] Revert "gallium/u_vbuf: skip draws with 0 vertices" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit be8d811e57973e9d3632f90e47fda1f5c24ca379. Fixes: be8d811e57973e9d3632f90e47fda1f5c24ca379 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4184 Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Zoltán Böszörményi Part-of: --- src/gallium/auxiliary/util/u_vbuf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index 02d40785f5b..4775591abad 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -1487,14 +1487,11 @@ void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info, new_draw.count = end_vertex - new_draw.start; new_info.instance_count = end_instance - new_info.start_instance; - if (new_draw.start == ~0u) + if (new_draw.start == ~0u || !new_draw.count || !new_info.instance_count) goto cleanup; } } - if (!new_draw.count || !new_info.instance_count) - goto cleanup; - if (new_info.index_size) { /* See if anything needs to be done for per-vertex attribs. */ if (u_vbuf_need_minmax_index(mgr)) {