summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_validate.c
diff options
context:
space:
mode:
authorBrian <brian@poulsbo.localnet.net>2008-02-26 14:29:35 -0700
committerBrian <brian@poulsbo.localnet.net>2008-02-26 14:32:57 -0700
commit5e29aab1752c3e07ae2ebde4cb00e6550dab0eb2 (patch)
tree87524f95d1c7900c3e38ddaeadc1910c8de813e8 /src/gallium/auxiliary/draw/draw_validate.c
parentb93cf55f4ecd94f5e9d5dda49d9092e3b769d044 (diff)
gallium: replace draw_convert_wide_points() with draw_wide_point_threshold()
Specifying a threshold size is a bit more flexible, and allows the option of converting even 1-pixel points to triangles (set threshold=0). Also, remove 0.25 pixel bias in wide_point().
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_validate.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_validate.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/gallium/auxiliary/draw/draw_validate.c b/src/gallium/auxiliary/draw/draw_validate.c
index 3a19dd4cd7..ded7d10c08 100644
--- a/src/gallium/auxiliary/draw/draw_validate.c
+++ b/src/gallium/auxiliary/draw/draw_validate.c
@@ -52,6 +52,19 @@ 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
+ && !draw->rasterizer->line_smooth);
+
+ /* drawing large points? */
+ if (draw->rasterizer->point_smooth && draw->pipeline.aapoint)
+ wide_points = FALSE;
+ else if (draw->rasterizer->point_size > draw->wide_point_threshold)
+ wide_points = TRUE;
+ else
+ wide_points = FALSE;
+
/*
* NOTE: we build up the pipeline in end-to-start order.
*
@@ -69,16 +82,6 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
next = draw->pipeline.aapoint;
}
- /* drawing wide lines? */
- wide_lines = (draw->rasterizer->line_width != 1.0
- && draw->convert_wide_lines
- && !draw->rasterizer->line_smooth);
-
- /* drawing large points? */
- wide_points = (draw->rasterizer->point_size != 1.0
- && draw->convert_wide_points
- && !draw->pipeline.aapoint);
-
if (wide_lines ||
wide_points ||
draw->rasterizer->point_sprite) {