r600: fix point sizes
authorAlex Deucher <alexdeucher@gmail.com>
Sat, 19 Sep 2009 19:18:42 +0000 (15:18 -0400)
committerAlex Deucher <alexdeucher@gmail.com>
Thu, 24 Sep 2009 14:02:22 +0000 (10:02 -0400)
registers takes radius

src/mesa/drivers/dri/r600/r700_state.c

index d8190efe473af05d0ba4a2ea42d46161decbbb1c..8571563149e57ee9bf664f2c50cc58ba93dbfe44 100644 (file)
@@ -837,9 +837,9 @@ static void r700PointSize(GLcontext * ctx, GLfloat size)
        size = CLAMP(size, ctx->Const.MinPointSize, ctx->Const.MaxPointSize);
 
        /* format is 12.4 fixed point */
-       SETfield(r700->PA_SU_POINT_SIZE.u32All, (int)(size * 16),
+       SETfield(r700->PA_SU_POINT_SIZE.u32All, (int)(size * 8.0),
                 PA_SU_POINT_SIZE__HEIGHT_shift, PA_SU_POINT_SIZE__HEIGHT_mask);
-       SETfield(r700->PA_SU_POINT_SIZE.u32All, (int)(size * 16),
+       SETfield(r700->PA_SU_POINT_SIZE.u32All, (int)(size * 8.0),
                 PA_SU_POINT_SIZE__WIDTH_shift, PA_SU_POINT_SIZE__WIDTH_mask);
 
 }
@@ -854,11 +854,11 @@ static void r700PointParameter(GLcontext * ctx, GLenum pname, const GLfloat * pa
        /* format is 12.4 fixed point */
        switch (pname) {
        case GL_POINT_SIZE_MIN:
-               SETfield(r700->PA_SU_POINT_MINMAX.u32All, (int)(ctx->Point.MinSize * 16.0),
+               SETfield(r700->PA_SU_POINT_MINMAX.u32All, (int)(ctx->Point.MinSize * 8.0),
                         MIN_SIZE_shift, MIN_SIZE_mask);
                break;
        case GL_POINT_SIZE_MAX:
-               SETfield(r700->PA_SU_POINT_MINMAX.u32All, (int)(ctx->Point.MaxSize * 16.0),
+               SETfield(r700->PA_SU_POINT_MINMAX.u32All, (int)(ctx->Point.MaxSize * 8.0),
                         MAX_SIZE_shift, MAX_SIZE_mask);
                break;
        case GL_POINT_DISTANCE_ATTENUATION: