can_cut_index_handle_prims() was passed an array of _mesa_prim objects and a count, and ran a loop for that many iterations. However, it treated the array like a pointer, repeatedly checking the first element.
This patch makes it actually check every primitive. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> --- src/mesa/drivers/dri/i965/brw_primitive_restart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_primitive_restart.c b/src/mesa/drivers/dri/i965/brw_primitive_restart.c index 0dbc48f..b305dca 100644 --- a/src/mesa/drivers/dri/i965/brw_primitive_restart.c +++ b/src/mesa/drivers/dri/i965/brw_primitive_restart.c @@ -92,8 +92,8 @@ can_cut_index_handle_prims(struct gl_context *ctx, return false; } - for ( ; nr_prims > 0; nr_prims--) { - switch(prim->mode) { + for (int i = 0; i < nr_prims; i++) { + switch (prim[i].mode) { case GL_POINTS: case GL_LINES: case GL_LINE_STRIP: -- 1.8.3.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev