diff options
-rw-r--r-- | src/gallium/auxiliary/util/u_vbuf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index 40bdf1ed830..7f4248fa49c 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -1030,6 +1030,12 @@ u_vbuf_get_minmax_index_mapped(const struct pipe_draw_info *info, const void *indices, unsigned *out_min_index, unsigned *out_max_index) { + if (!info->count) { + *out_min_index = 0; + *out_max_index = 0; + return; + } + switch (info->index_size) { case 4: { const unsigned *ui_indices = (const unsigned*)indices; |