From 4494b85f995d5eca8c7bcf76bac8c5feb9c83cb6 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 19 Feb 2013 12:24:32 -0700 Subject: st/mesa: fix trimming of GL_QUAD_STRIP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We sometimes convert GL_QUAD_STRIP prims into GL_TRIANGLE_STRIP, but that changes the results of the u_trim_pipe_prim() call. We need to pass the original primitive type to the trim function. Note that OpenGL's GL_x prim type values match Gallium's PIPE_PRIM_x values. Fixes a failure in the new piglit degenerate-prims test. Note: This is a candidate for the stable branches. Reviewed-by: José Fonseca (cherry picked from commit 8589cc41b36b89bc80ad6a4f671e47f81a89d556) --- src/mesa/state_tracker/st_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index c31a6ff7a4..c2e381b756 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -274,7 +274,7 @@ st_draw_vbo(struct gl_context *ctx, /* don't trim, restarts might be inside index list */ cso_draw_vbo(st->cso_context, &info); } - else if (u_trim_pipe_prim(info.mode, &info.count)) + else if (u_trim_pipe_prim(prims[i].mode, &info.count)) cso_draw_vbo(st->cso_context, &info); } -- cgit v1.2.3