From 4f9d29cd4e876cd202a7d3e81f6d91fc7f9625a2 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 27 Sep 2007 10:23:32 -0600 Subject: tweak point rast to fix conform failure --- src/mesa/swrast/s_points.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/mesa/swrast') diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c index 21316372e8..d54adc8fd1 100644 --- a/src/mesa/swrast/s_points.c +++ b/src/mesa/swrast/s_points.c @@ -172,9 +172,10 @@ sprite_point(GLcontext *ctx, const SWvertex *vert) } else { /* even size */ - xmin = (GLint) x - iRadius; + /* 0.501 factor allows conformance to pass */ + xmin = (GLint) (x + 0.501) - iRadius; xmax = xmin + iSize - 1; - ymin = (GLint) y - iRadius; + ymin = (GLint) (y + 0.501) - iRadius; ymax = ymin + iSize - 1; } @@ -418,9 +419,10 @@ large_point(GLcontext *ctx, const SWvertex *vert) } else { /* even size */ - xmin = (GLint) x - iRadius; + /* 0.501 factor allows conformance to pass */ + xmin = (GLint) (x + 0.501) - iRadius; xmax = xmin + iSize - 1; - ymin = (GLint) y - iRadius; + ymin = (GLint) (y + 0.501) - iRadius; ymax = ymin + iSize - 1; } -- cgit v1.2.3