draw: check for line_width != 1.0f in validate_pipeline()
authorBrian Paul <brianp@vmware.com>
Thu, 15 Jun 2017 17:29:38 +0000 (11:29 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 15 Jun 2017 19:53:00 +0000 (13:53 -0600)
We shouldn't use the wide line stage if the line width is 1.
This check isn't strictly needed because all drivers are (now)
specifying a line wide threshold of at least 1.0 pixels, but
let's play it safe.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/auxiliary/draw/draw_pipe_validate.c

index 01d07593d5c2caac6676474ba7b87cca47385868..846cd4db39e87e6eb4e3f5fdc93f033fc85688ca 100644 (file)
@@ -156,9 +156,10 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
     */
    stage->next = next;
 
-   /* drawing wide lines? */
-   wide_lines = (roundf(rast->line_width) > draw->pipeline.wide_line_threshold
-                 && !rast->line_smooth);
+   /* drawing wide, non-AA lines? */
+   wide_lines = rast->line_width != 1.0f &&
+                roundf(rast->line_width) > draw->pipeline.wide_line_threshold &&
+                !rast->line_smooth;
 
    /* drawing large/sprite points (but not AA points)? */
    if (rast->sprite_coord_enable && draw->pipeline.point_sprite)