summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-07-21 10:06:18 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-07-21 10:06:41 -0600
commitaf2aa8e9cf88a9ee3ec338eddc9a47bf2f142cb7 (patch)
tree39abc89e77ed3a102551d1c18bf11a13f2310fa6 /src/mesa/drivers/dri/r300
parent5842bc3bf9e33333b122ce7fd6bf108aab780111 (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/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index a790acacfe..088216c76e 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -733,8 +733,8 @@ static void r300Fogfv(GLcontext * ctx, GLenum pname, const GLfloat * param)
static void r300PointSize(GLcontext * ctx, GLfloat size)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
-
- size = ctx->Point._Size;
+ /* same size limits for AA, non-AA points */
+ size = CLAMP(size, ctx->Const.MinPointSize, ctx->Const.MaxPointSize);
R300_STATECHANGE(r300, ps);
r300->hw.ps.cmd[R300_PS_POINTSIZE] =
@@ -749,8 +749,9 @@ static void r300LineWidth(GLcontext * ctx, GLfloat widthf)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
- widthf = ctx->Line._Width;
-
+ widthf = CLAMP(widthf,
+ ctx->Const.MinPointSize,
+ ctx->Const.MaxPointSize);
R300_STATECHANGE(r300, lcntl);
r300->hw.lcntl.cmd[1] =
R300_LINE_CNT_HO | R300_LINE_CNT_VE | (int)(widthf * 6.0);