summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-02-19 12:24:32 -0700
committerBrian Paul <[email protected]>2013-02-22 16:49:05 -0700
commit8589cc41b36b89bc80ad6a4f671e47f81a89d556 (patch)
tree01ccaf1c8ca55d8c3a3ec1bf70f4efc752c21591 /src/mesa/state_tracker
parent8b5acad0e985215b46fc1cfc8ad87c8771a11a3a (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 <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-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 de62264a16c..bff8d9b3143 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -283,7 +283,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);
}