mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 22:50:08 +01:00
gallium/u_vbuf: skip draws with 0 vertices
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
This commit is contained in:
parent
431cd34cdb
commit
be8d811e57
1 changed files with 4 additions and 1 deletions
|
|
@ -1487,11 +1487,14 @@ 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 || !new_draw.count || !new_info.instance_count)
|
||||
if (new_draw.start == ~0u)
|
||||
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)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue