i965: fix point size issue
authorRoland Scheidegger <sroland@vmware.com>
Thu, 23 Apr 2009 21:41:41 +0000 (23:41 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 24 Apr 2009 00:40:05 +0000 (02:40 +0200)
need to clamp point size to user set min/max values, even for constant
point size. Fixes glean pointAtten test.

src/mesa/drivers/dri/i965/brw_sf_state.c

index fc4eddda0a5899db29a31982afb6228b9bfa07c3..68fa9820b6fba3a82926abaa8911ef38965720f3 100644 (file)
@@ -147,7 +147,7 @@ sf_unit_populate_key(struct brw_context *brw, struct brw_sf_unit_key *key)
    key->line_smooth = ctx->Line.SmoothFlag;
 
    key->point_sprite = ctx->Point.PointSprite;
-   key->point_size = ctx->Point.Size;
+   key->point_size = CLAMP(ctx->Point.Size, ctx->Point.MinSize, ctx->Point.MaxSize);
    key->point_attenuated = ctx->Point._Attenuated;
 
    key->render_to_fbo = brw->intel.ctx.DrawBuffer->Name != 0;