diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2008-05-12 19:40:20 +0100 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2008-05-12 19:40:20 +0100 |
commit | bbda45ec769120324f44febf00c6bb170f594f23 (patch) | |
tree | 389eb40d9208cb0994bd47e54d7620c75f8187ab /src/gallium/auxiliary/draw/draw_pt_varray_tmp_linear.h | |
parent | 44463b2997826cd14def00abf724a7a65a4fc7cb (diff) |
draw: turn fse path into a middle end
Also add some util functions in pt_util.c
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_varray_tmp_linear.h')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_varray_tmp_linear.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_varray_tmp_linear.h b/src/gallium/auxiliary/draw/draw_pt_varray_tmp_linear.h index b6f1f0cadc..114ed371a0 100644 --- a/src/gallium/auxiliary/draw/draw_pt_varray_tmp_linear.h +++ b/src/gallium/auxiliary/draw/draw_pt_varray_tmp_linear.h @@ -16,7 +16,13 @@ static void FUNC(struct draw_pt_front_end *frontend, varray->fetch_start = start; - split_prim_inplace(varray->input_prim, &first, &incr); + draw_pt_split_prim(varray->input_prim, &first, &incr); + + /* Sanitize primitive length: + */ + count = trim(count, first, incr); + if (count < first) + return; #if 0 debug_printf("%s (%d) %d/%d\n", __FUNCTION__, @@ -32,7 +38,6 @@ static void FUNC(struct draw_pt_front_end *frontend, case PIPE_PRIM_TRIANGLE_STRIP: case PIPE_PRIM_QUADS: case PIPE_PRIM_QUAD_STRIP: - for (j = 0; j < count;) { unsigned remaining = count - j; unsigned nr = trim( MIN2(FETCH_MAX, remaining), first, incr ); |