aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorZou Nan hai <[email protected]>2008-03-17 17:52:26 +0800
committerZou Nan hai <[email protected]>2008-03-17 17:52:26 +0800
commit8d5231a3582e4f2769ac0685cf0174e09750700e (patch)
tree1f85e4aa22f92d86199e8a9c9f7d180799c438b5 /src/mesa/drivers/dri/i965
parent4a556bcb17b8b0dd9ba4ef6eccbb3cfb2ad6a025 (diff)
[i965] round pointsize to nearest int according to spec
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf_state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_sf_state.c b/src/mesa/drivers/dri/i965/brw_sf_state.c
index 2b6087d6915..398048429b7 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_state.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_state.c
@@ -224,11 +224,11 @@ sf_unit_create_from_key(struct brw_context *brw, struct brw_sf_unit_key *key,
sf.sf6.line_width = 0;
/* _NEW_POINT */
- sf.sf6.point_rast_rule = 1; /* opengl conventions */
+ sf.sf6.point_rast_rule = BRW_RASTRULE_UPPER_RIGHT; /* opengl conventions */
/* XXX clamp max depends on AA vs. non-AA */
sf.sf7.sprite_point = key->point_sprite;
- sf.sf7.point_size = CLAMP(key->point_size, 1.0, 255.0) * (1<<3);
+ sf.sf7.point_size = CLAMP(nearbyint(key->point_size), 1, 255) * (1<<3);
sf.sf7.use_point_size_state = !key->point_attenuated;
sf.sf7.aa_line_distance_mode = 0;