summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw/draw_clip.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2007-11-25 13:00:15 +1100
committerBen Skeggs <skeggsb@gmail.com>2007-11-25 13:00:15 +1100
commit2bd97ca9427bbb90c1ac81f8947d33dba4b86290 (patch)
treee45cc99e45af12c4d05951a0ca17fc26ec634f68 /src/mesa/pipe/draw/draw_clip.c
parent2a2756a019ecdd5406ef84019610a0016868a39b (diff)
parent7043db677f457ae9a46f2585a5ef52bf69a4e8ea (diff)
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Diffstat (limited to 'src/mesa/pipe/draw/draw_clip.c')
-rw-r--r--src/mesa/pipe/draw/draw_clip.c14
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 bc62d422a4..e4c257a0ee 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 );
}