gallium/u_vbuf: skip non-indirect draws with 0 vertices

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8770>
This commit is contained in:
Marek Olšák 2021-01-26 00:35:10 -05:00
parent dc9645be67
commit 32fc4dada2
1 changed files with 3 additions and 0 deletions

View File

@ -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) {