draw: Respect max_indices from the renderer.
authorKurt Daverman <krd@vmware.com>
Mon, 7 Mar 2011 13:11:03 +0000 (13:11 +0000)
committerBrian Paul <brianp@vmware.com>
Thu, 22 Sep 2011 14:26:40 +0000 (08:26 -0600)
src/gallium/auxiliary/draw/draw_pipe_vbuf.c

index 61ae4665539d8ba70e5f68908b140abf226f5cec..a9b0f22c488dcbff12c9e5c28fe163e4a7957554 100644 (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]),