From: Luca Barbieri Date: Fri, 3 Sep 2010 18:57:44 +0000 (+0200) Subject: nvfx: fix division by zero in vp-ignore-input X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=67a9a90794ae2a3e8019dbcb0d3d0b97111b862b;p=mesa.git nvfx: fix division by zero in vp-ignore-input --- diff --git a/src/gallium/drivers/nvfx/nvfx_vbo.c b/src/gallium/drivers/nvfx/nvfx_vbo.c index e6e9a8f2e40..611de808af5 100644 --- a/src/gallium/drivers/nvfx/nvfx_vbo.c +++ b/src/gallium/drivers/nvfx/nvfx_vbo.c @@ -527,7 +527,7 @@ nvfx_vtxelts_state_create(struct pipe_context *pipe, cso->translate = translate_create(&transkey); cso->vertex_length = transkey.output_stride >> 2; - cso->max_vertices_per_packet = 2047 / cso->vertex_length; + cso->max_vertices_per_packet = 2047 / MAX2(cso->vertex_length, 1); return (void *)cso; }