summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_emit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_emit.c b/src/gallium/auxiliary/draw/draw_pt_emit.c
index b215c5f4db4..d1eafd84032 100644
--- a/src/gallium/auxiliary/draw/draw_pt_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_emit.c
@@ -113,8 +113,11 @@ draw_pt_emit_prepare(struct pt_emit *emit,
emit->translate = translate_cache_find(emit->cache, &hw_key);
}
- *max_vertices = (draw->render->max_vertex_buffer_bytes /
- (vinfo->size * 4));
+ if (!vinfo->size)
+ *max_vertices = 0;
+ else
+ *max_vertices = (draw->render->max_vertex_buffer_bytes /
+ (vinfo->size * 4));
}