diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c index ad5257ce369..6a43f0ba886 100644 --- a/src/gallium/auxiliary/draw/draw_pt.c +++ b/src/gallium/auxiliary/draw/draw_pt.c @@ -63,21 +63,6 @@ draw_pt_arrays(struct draw_context *draw, struct draw_pt_middle_end *middle = NULL; unsigned opt = 0; - /* Sanitize primitive length: - */ - { - unsigned first, incr; - - if (prim == PIPE_PRIM_PATCHES) { - first = draw->pt.vertices_per_patch; - incr = draw->pt.vertices_per_patch; - } else - draw_pt_split_prim(prim, &first, &incr); - count = draw_pt_trim_count(count, first, incr); - if (count < first) - return TRUE; - } - if (!draw->force_passthrough) { unsigned out_prim = prim; @@ -155,6 +140,22 @@ draw_pt_arrays(struct draw_context *draw, draw->pt.rebind_parameters = FALSE; } + + /* Sanitize primitive length: + */ + { + unsigned first, incr; + + if (prim == PIPE_PRIM_PATCHES) { + first = draw->pt.vertices_per_patch; + incr = draw->pt.vertices_per_patch; + } else + draw_pt_split_prim(prim, &first, &incr); + count = draw_pt_trim_count(count, first, incr); + if (count < first) + return TRUE; + } + frontend->run( frontend, start, count ); return TRUE;