summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_validate.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-02-28 17:49:22 -0700
committerBrian Paul <brian.paul@tungstengraphics.com>2008-02-28 17:49:22 -0700
commita1a13954885cd469faab49633b5386e5c889e3df (patch)
tree21f3558538adf1296b98c3919e82f50d5490a1c7 /src/gallium/auxiliary/draw/draw_validate.c
parent70126588cf78b8a835dfced2b7ca7f1e05afeb67 (diff)
gallium: split draw_wide_prim stage into separate point/line stages.
This fixes a validation/code-path problem. Enabling the stage for the sake of wide points also inadvertantly caused wide lines to be converted to tris when we actually want them passed through, such as for the AA line stage. This is just cleaner now. Also, replace draw_convert_wide_lines() with draw_wide_line_threshold() as was done for points. Allows for 1-pixel lines to be converted too if needed.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_validate.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_validate.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/draw/draw_validate.c b/src/gallium/auxiliary/draw/draw_validate.c
index ded7d10c08..084eee9b6e 100644
--- a/src/gallium/auxiliary/draw/draw_validate.c
+++ b/src/gallium/auxiliary/draw/draw_validate.c
@@ -53,8 +53,7 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
stage->next = next;
/* drawing wide lines? */
- wide_lines = (draw->rasterizer->line_width != 1.0
- && draw->convert_wide_lines
+ wide_lines = (draw->rasterizer->line_width > draw->wide_line_threshold
&& !draw->rasterizer->line_smooth);
/* drawing large points? */
@@ -82,11 +81,14 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
next = draw->pipeline.aapoint;
}
- if (wide_lines ||
- wide_points ||
- draw->rasterizer->point_sprite) {
- draw->pipeline.wide->next = next;
- next = draw->pipeline.wide;
+ if (wide_lines) {
+ draw->pipeline.wide_line->next = next;
+ next = draw->pipeline.wide_line;
+ }
+
+ if (wide_points || draw->rasterizer->point_sprite) {
+ draw->pipeline.wide_point->next = next;
+ next = draw->pipeline.wide_point;
}
if (draw->rasterizer->line_stipple_enable) {