diff options
author | Brian <[email protected]> | 2007-07-21 10:06:18 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-07-21 10:06:41 -0600 |
commit | af2aa8e9cf88a9ee3ec338eddc9a47bf2f142cb7 (patch) | |
tree | 39abc89e77ed3a102551d1c18bf11a13f2310fa6 /src/mesa/drivers/dri/i810/i810state.c | |
parent | 5842bc3bf9e33333b122ce7fd6bf108aab780111 (diff) |
Remove ctx->Point._Size and ctx->Line._Width.
The clamping for these values depends on whether we're drawing AA or non-AA
points, lines. Defer clamping until drawing time. Drivers could compute and
keep clamped AA and clamped non-AA values if desired.
Diffstat (limited to 'src/mesa/drivers/dri/i810/i810state.c')
-rw-r--r-- | src/mesa/drivers/dri/i810/i810state.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i810/i810state.c b/src/mesa/drivers/dri/i810/i810state.c index 3ad25282d90..e0d5b2b4876 100644 --- a/src/mesa/drivers/dri/i810/i810state.c +++ b/src/mesa/drivers/dri/i810/i810state.c @@ -380,7 +380,10 @@ static void i810CullFaceFrontFace(GLcontext *ctx, GLenum unused) static void i810LineWidth( GLcontext *ctx, GLfloat widthf ) { i810ContextPtr imesa = I810_CONTEXT( ctx ); - int width = (int)ctx->Line._Width; + /* AA, non-AA limits are same */ + const int width = (int) CLAMP(ctx->Line.Width, + ctx->Const.MinLineWidth, + ctx->Const.MaxLineWidth); imesa->LcsLineWidth = 0; if (width & 1) imesa->LcsLineWidth |= LCS_LINEWIDTH_1_0; @@ -396,7 +399,10 @@ static void i810LineWidth( GLcontext *ctx, GLfloat widthf ) static void i810PointSize( GLcontext *ctx, GLfloat sz ) { i810ContextPtr imesa = I810_CONTEXT( ctx ); - int size = (int)ctx->Point._Size; + /* AA, non-AA limits are same */ + const int size = (int) CLAMP(ctx->Point.Size, + ctx->Const.MinPointSize, + ctx->Const.MaxPointSize); imesa->LcsPointSize = 0; if (size & 1) imesa->LcsPointSize |= LCS_LINEWIDTH_1_0; |