draw: Respect max_indices from the renderer.

This commit is contained in:
Kurt Daverman 2011-03-07 13:11:03 +00:00 committed by Brian Paul
parent 37ef7c22ab
commit 3c56280d33

View file

@ -437,7 +437,7 @@ struct draw_stage *draw_vbuf_stage( struct draw_context *draw,
vbuf->stage.destroy = vbuf_destroy;
vbuf->render = render;
vbuf->max_indices = MAX2(render->max_indices, UNDEFINED_VERTEX_ID-1);
vbuf->max_indices = MIN2(render->max_indices, UNDEFINED_VERTEX_ID-1);
vbuf->indices = (ushort *) align_malloc( vbuf->max_indices *
sizeof(vbuf->indices[0]),