aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-09-03 20:57:44 +0200
committerLuca Barbieri <[email protected]>2010-09-03 20:57:44 +0200
commit67a9a90794ae2a3e8019dbcb0d3d0b97111b862b (patch)
treed96409bfcd8c43aba9c1da230157801b8c4f3231 /src/gallium
parentf1980af71d3c71546e9de2bc87f29b63f4db831a (diff)
nvfx: fix division by zero in vp-ignore-input
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_vbo.c2
1 files changed, 1 insertions, 1 deletions
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;
}