summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 e6e9a8f2e4..611de808af 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;
}