summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_wide_prims.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_wide_prims.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_wide_prims.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_wide_prims.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_wide_prims.c b/src/gallium/auxiliary/draw/draw_wide_prims.c
index 1f8069bdca..d967810dd4 100644
--- a/src/gallium/auxiliary/draw/draw_wide_prims.c
+++ b/src/gallium/auxiliary/draw/draw_wide_prims.c
@@ -219,8 +219,8 @@ static void wide_point( struct draw_stage *stage,
half_size = wide->half_point_size;
}
- left_adj = -half_size + 0.25f;
- right_adj = half_size + 0.25f;
+ left_adj = -half_size; /* + 0.25f;*/
+ right_adj = half_size; /* + 0.25f;*/
pos0[0] += left_adj;
pos0[1] -= half_size;
@@ -266,7 +266,8 @@ static void wide_first_point( struct draw_stage *stage,
wide->half_point_size = 0.5f * draw->rasterizer->point_size;
- if (draw->rasterizer->point_size != 1.0) {
+ /* XXX we won't know the real size if it's computed by the vertex shader! */
+ if (draw->rasterizer->point_size > draw->wide_point_threshold) {
stage->point = wide_point;
}
else {