diff options
author | Brian <[email protected]> | 2007-11-21 15:40:20 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-11-21 15:40:20 -0700 |
commit | fbe68bf6b286056bb03f44907a078918d04cbdfd (patch) | |
tree | 40535ef7aab0350bce053e3f3b432f2c454461d6 /src/mesa/pipe/draw/draw_clip.c | |
parent | 5a6017d496ccce94d7e3cf9a6cfe1db886dcc767 (diff) |
Simplify draw module's vertex_info.
No longer store the vertex header and clip pos info in the draw module's
vertex_info. The vertex_info just describes the data[] elements.
This simplifies the code in several places.
Diffstat (limited to 'src/mesa/pipe/draw/draw_clip.c')
-rw-r--r-- | src/mesa/pipe/draw/draw_clip.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/mesa/pipe/draw/draw_clip.c b/src/mesa/pipe/draw/draw_clip.c index bc62d422a42..e4c257a0ee2 100644 --- a/src/mesa/pipe/draw/draw_clip.c +++ b/src/mesa/pipe/draw/draw_clip.c @@ -128,12 +128,8 @@ static void interp( const struct clipper *clip, /* Other attributes * Note: start at 1 to skip winpos (data[0]) since we just computed * it above. - * Subtract two from nr_attrs since the first two attribs (always - * VF_ATTRIB_VERTEX_HEADER and VF_ATTRIB_CLIP_POS, see - * draw_set_vertex_attributes()) are in the vertex_header struct, - * not in the data[] array. */ - for (j = 1; j < nr_attrs - 2; j++) { + for (j = 1; j < nr_attrs; j++) { interp_attr(dst->data[j], t, in->data[j], out->data[j]); } } @@ -352,12 +348,8 @@ do_clip_line( struct draw_stage *stage, static void clip_begin( struct draw_stage *stage ) { - /* sanity checks. If these fail, review the clip/interp code! */ - assert(stage->draw->vertex_info.num_attribs >= 3); -#if 0 - assert(stage->draw->vertex_info.slot_to_attrib[0] == TGSI_ATTRIB_VERTEX_HEADER); - assert(stage->draw->vertex_info.slot_to_attrib[1] == TGSI_ATTRIB_CLIP_POS); -#endif + /* should always have position, at least */ + assert(stage->draw->vertex_info.num_attribs >= 1); stage->next->begin( stage->next ); } |