From 32fc4dada20a88a33e165e37e7df6734b7099dd7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 26 Jan 2021 00:35:10 -0500 Subject: [PATCH] gallium/u_vbuf: skip non-indirect draws with 0 vertices MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Zoltán Böszörményi Part-of: --- src/gallium/auxiliary/util/u_vbuf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index 4775591..6f4e912 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -1490,6 +1490,9 @@ void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info, if (new_draw.start == ~0u || !new_draw.count || !new_info.instance_count) goto cleanup; } + } else { + if ((!indirect && !new_draw.count) || !new_info.instance_count) + goto cleanup; } if (new_info.index_size) { -- 2.7.4