From 3c56280d330f50025fc948041f1413af55c50581 Mon Sep 17 00:00:00 2001 From: Kurt Daverman Date: Mon, 7 Mar 2011 13:11:03 +0000 Subject: [PATCH] draw: Respect max_indices from the renderer. --- src/gallium/auxiliary/draw/draw_pipe_vbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]), -- 2.30.2