Mesa (radeon-rewrite): r300: fix point size clamping when point is not attenuated

Alex Deucher agd5f at kemper.freedesktop.org
Mon Apr 27 18:44:13 UTC 2009


Module: Mesa
Branch: radeon-rewrite
Commit: 78c0e6aefcef442f035494b6fc9f6b599fe75e7e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=78c0e6aefcef442f035494b6fc9f6b599fe75e7e

Author: Maciej Cencora <m.cencora at gmail.com>
Date:   Sat Apr 25 13:48:53 2009 +0200

r300: fix point size clamping when point is not attenuated

---

 src/mesa/drivers/dri/r300/r300_state.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 9c8b8ad..99441a2 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -728,7 +728,12 @@ static void r300ColorMask(GLcontext * ctx,
 static void r300PointSize(GLcontext * ctx, GLfloat size)
 {
 	r300ContextPtr r300 = R300_CONTEXT(ctx);
-        /* same size limits for AA, non-AA points */
+
+	/* We need to clamp to user defined range here, because
+	 * the HW clamping happens only for per vertex point size. */
+	size = CLAMP(size, ctx->Point.MinSize, ctx->Point.MaxSize);
+
+	/* same size limits for AA, non-AA points */
 	size = CLAMP(size, ctx->Const.MinPointSize, ctx->Const.MaxPointSize);
 
 	R300_STATECHANGE(r300, ps);




More information about the mesa-commit mailing list