[Mesa-dev] [PATCH 2/2] draw: check for line_width != 1.0f in validate_pipeline()

Charmaine Lee charmainel at vmware.com
Thu Jun 15 18:53:36 UTC 2017


For the series, Reviewed-by: Charmaine Lee <charmainel at vmware.com>
________________________________________
From: Brian Paul <brianp at vmware.com>
Sent: Thursday, June 15, 2017 10:42:00 AM
To: mesa-dev at lists.freedesktop.org
Cc: Charmaine Lee; Neha Bhende
Subject: [PATCH 2/2] draw: check for line_width != 1.0f in validate_pipeline()

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.
---
 src/gallium/auxiliary/draw/draw_pipe_validate.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pipe_validate.c b/src/gallium/auxiliary/draw/draw_pipe_validate.c
index 01d0759..846cd4d 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_validate.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_validate.c
@@ -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)
--
1.9.1



More information about the mesa-dev mailing list