diff options
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c index 50286149cd4..eeebca30ce7 100644 --- a/src/gallium/auxiliary/draw/draw_pt.c +++ b/src/gallium/auxiliary/draw/draw_pt.c @@ -440,7 +440,8 @@ resolve_draw_info(const struct pipe_draw_info *raw_info, struct draw_so_target *target = (struct draw_so_target *)info->count_from_stream_output; assert(vertex_buffer != NULL); - info->count = target->internal_offset / vertex_buffer->stride; + info->count = vertex_buffer->stride == 0 ? 0 : + target->internal_offset / vertex_buffer->stride; /* Stream output draw can not be indexed */ debug_assert(!info->index_size); |