draw: fix incorrect color of flat-shaded clipped lines
authorBrian Paul <brianp@vmware.com>
Mon, 3 Feb 2014 18:33:03 +0000 (11:33 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 3 Feb 2014 19:50:04 +0000 (12:50 -0700)
commitfc3fcd1e01093e8ab8d06d95c53f875ace57ca7f
tree7a97d7848969029d20605d22521837f8da01c9b8
parent349b76a55364c0bb33daa4e1ebe36dd689e35807
draw: fix incorrect color of flat-shaded clipped lines

When we clipped a line weren't copying the provoking vertex
color to the second vertex.  We also weren't checking for
first vs. last provoking vertex.

Fixes failures found with the new piglit line-flat-clip-color test.

Cc: "10.0, 10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/draw/draw_pipe_clip.c