diff options
author | Brian <brian@poulsbo.localnet.net> | 2008-02-26 14:29:35 -0700 |
---|---|---|
committer | Brian <brian@poulsbo.localnet.net> | 2008-02-26 14:32:57 -0700 |
commit | 5e29aab1752c3e07ae2ebde4cb00e6550dab0eb2 (patch) | |
tree | 87524f95d1c7900c3e38ddaeadc1910c8de813e8 /src/gallium/auxiliary/draw/draw_validate.c | |
parent | b93cf55f4ecd94f5e9d5dda49d9092e3b769d044 (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.c | 23 |
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) { |