Mesa (gallium-mesa-7.4): swrast: fix point rendering function selection

Alan Hourihane alanh at kemper.freedesktop.org
Wed Apr 8 15:42:43 UTC 2009


Module: Mesa
Branch: gallium-mesa-7.4
Commit: 6c3bec4387d7483d4b9652c7eb9313e3ec415898
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6c3bec4387d7483d4b9652c7eb9313e3ec415898

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Apr  7 13:44:50 2009 -0600

swrast: fix point rendering function selection

Need to clamp default point size to min/max range before checking if it's one.
Fixes glean pointAtten test.

(cherry picked from master, commit 228f20e324249ef25beed725a6a821e0bd0cc232)

---

 src/mesa/swrast/s_points.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c
index 61ff4d0..0a3ad97 100644
--- a/src/mesa/swrast/s_points.c
+++ b/src/mesa/swrast/s_points.c
@@ -570,6 +570,9 @@ void
 _swrast_choose_point(GLcontext *ctx)
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
+   const GLfloat size = CLAMP(ctx->Point.Size,
+                              ctx->Point.MinSize,
+                              ctx->Point.MaxSize);
 
    if (ctx->RenderMode == GL_RENDER) {
       if (ctx->Point.PointSprite) {
@@ -578,7 +581,7 @@ _swrast_choose_point(GLcontext *ctx)
       else if (ctx->Point.SmoothFlag) {
          swrast->Point = smooth_point;
       }
-      else if (ctx->Point.Size > 1.0 ||
+      else if (size > 1.0 ||
                ctx->Point._Attenuated ||
                ctx->VertexProgram.PointSizeEnabled) {
          swrast->Point = large_point;




More information about the mesa-commit mailing list