int attr = 0;
int urb_start;
int two_side_color = (ctx->Light.Enabled && ctx->Light.Model.TwoSide);
+ float point_size;
/* _NEW_TRANSFORM */
if (ctx->Transform.ClipPlanesEnabled)
ctx->Point._Attenuated))
dw4 |= GEN6_SF_USE_STATE_POINT_WIDTH;
- dw4 |= U_FIXED(CLAMP(ctx->Point.Size, 0.125, 255.875), 3) <<
- GEN6_SF_POINT_WIDTH_SHIFT;
+ /* Clamp to ARB_point_parameters user limits */
+ point_size = CLAMP(ctx->Point.Size, ctx->Point.MinSize, ctx->Point.MaxSize);
+
+ /* Clamp to the hardware limits and convert to fixed point */
+ dw4 |= U_FIXED(CLAMP(point_size, 0.125, 255.875), 3);
+
if (ctx->Point.SpriteOrigin == GL_LOWER_LEFT)
dw1 |= GEN6_SF_POINT_SPRITE_LOWERLEFT;