draw: set precalc_flat flag for AA lines too
authorBrian Paul <brianp@vmware.com>
Tue, 4 Dec 2012 23:32:01 +0000 (16:32 -0700)
committerAndreas Boll <andreas.boll.dev@gmail.com>
Wed, 13 Feb 2013 17:38:42 +0000 (18:38 +0100)
Fixes flat shading for AA lines.  demos/src/trivial/line-smooth is a
test case which hits this.

Note: This is a candidate for the stable branches.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
(cherry picked from commit d2c7fe5389e40871a7e339dc0ecaa7f570f851ed)

src/gallium/auxiliary/draw/draw_pipe_validate.c

index 27afba5..4b0ed14 100644 (file)
@@ -195,6 +195,7 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
    if (rast->line_smooth && draw->pipeline.aaline) {
       draw->pipeline.aaline->next = next;
       next = draw->pipeline.aaline;
+      precalc_flat = TRUE;
    }
 
    if (rast->point_smooth && draw->pipeline.aapoint) {