From: Kurt Daverman Date: Mon, 7 Mar 2011 13:11:03 +0000 (+0000) Subject: draw: Respect max_indices from the renderer. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c56280d330f50025fc948041f1413af55c50581;p=mesa.git draw: Respect max_indices from the renderer. --- diff --git a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c index 61ae4665539..a9b0f22c488 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c +++ b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c @@ -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]),