mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
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 8589cc41b3)
This commit is contained in:
parent
b382f1dbeb
commit
6bc298a5b0
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue