st/mesa: fix trimming of GL_QUAD_STRIP
authorBrian Paul <brianp@vmware.com>
Tue, 19 Feb 2013 19:24:32 +0000 (12:24 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 22 Feb 2013 23:49:05 +0000 (16:49 -0700)
commit8589cc41b36b89bc80ad6a4f671e47f81a89d556
tree01ccaf1c8ca55d8c3a3ec1bf70f4efc752c21591
parent8b5acad0e985215b46fc1cfc8ad87c8771a11a3a
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>
src/mesa/state_tracker/st_draw.c