From 67a9a90794ae2a3e8019dbcb0d3d0b97111b862b Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Fri, 3 Sep 2010 20:57:44 +0200 Subject: [PATCH] nvfx: fix division by zero in vp-ignore-input --- src/gallium/drivers/nvfx/nvfx_vbo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.30.2