summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-02-19 12:24:32 -0700
committerAndreas Boll <andreas.boll.dev@gmail.com>2013-04-17 12:43:45 +0200
commit4494b85f995d5eca8c7bcf76bac8c5feb9c83cb6 (patch)
tree8954c8d1066150c7571da771de8893dc8601ab23
parent3b68a183d036b0ec72f14913fb948af3db3c4f40 (diff)
st/mesa: fix trimming of GL_QUAD_STRIP
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 <jfonseca@vmware.com> (cherry picked from commit 8589cc41b36b89bc80ad6a4f671e47f81a89d556)
-rw-r--r--src/mesa/state_tracker/st_draw.c2
1 files changed, 1 insertions, 1 deletions
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);
}