gallium/draw: remove always-true conditional
[mesa.git] / src / gallium / auxiliary / draw / draw_pipe_clip.c
index 3265dcd154a90964ced2f5f48c2bf0c65a073d4e..e51a9da76551763117d1e934f6a65e6769e98a23 100644 (file)
@@ -114,8 +114,8 @@ static void interp( const struct clipper *clip,
                    const struct vertex_header *out, 
                    const struct vertex_header *in )
 {
-   const unsigned nr_attrs = clip->stage.draw->vs.num_vs_outputs;
-   const unsigned pos_attr = clip->stage.draw->vs.position_output;
+   const unsigned nr_attrs = draw_current_shader_outputs(clip->stage.draw);
+   const unsigned pos_attr = draw_current_shader_position_output(clip->stage.draw);
    unsigned j;
 
    /* Vertex header.
@@ -291,9 +291,7 @@ do_clip_tri( struct draw_stage *stage,
    /* If flat-shading, copy color to new provoking vertex.
     */
    if (clipper->flat && inlist[0] != header->v[2]) {
-      if (1) {
-        inlist[0] = dup_vert(stage, inlist[0], tmpnr++);
-      }
+      inlist[0] = dup_vert(stage, inlist[0], tmpnr++);
 
       copy_colors(stage, inlist[0], header->v[2]);
    }
@@ -496,6 +494,7 @@ struct draw_stage *draw_clip_stage( struct draw_context *draw )
       goto fail;
 
    clipper->stage.draw = draw;
+   clipper->stage.name = "clipper";
    clipper->stage.point = clip_point;
    clipper->stage.line = clip_first_line;
    clipper->stage.tri = clip_first_tri;