diff options
author | Keith Whitwell <[email protected]> | 2001-01-13 05:48:25 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2001-01-13 05:48:25 +0000 |
commit | 321f67c4729adeebd7aa9ef9e22c95e709952851 (patch) | |
tree | 8661da8a994f3c554c4428afdd53642c0814854b /src/mesa/main/lines.c | |
parent | a087c7421bef25747e1d692f62062393d849c501 (diff) |
Fix crash in book/stencil.
Allow drivers to perform the perspective divide themselves. Assembly
to do cliptesting without perspective divide for size-4 vectors.
Diffstat (limited to 'src/mesa/main/lines.c')
-rw-r--r-- | src/mesa/main/lines.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c index 730e3f572f9..8a9256c1789 100644 --- a/src/mesa/main/lines.c +++ b/src/mesa/main/lines.c @@ -1,4 +1,4 @@ -/* $Id: lines.c,v 1.25 2001/01/08 04:09:41 keithw Exp $ */ +/* $Id: lines.c,v 1.26 2001/01/13 05:48:25 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -79,12 +79,14 @@ _mesa_LineStipple( GLint factor, GLushort pattern ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (ctx->Line.StippleFactor == CLAMP( factor, 1, 256 ) && + factor = CLAMP( factor, 1, 256 ); + + if (ctx->Line.StippleFactor == factor && ctx->Line.StipplePattern == pattern) return; FLUSH_VERTICES(ctx, _NEW_LINE); - ctx->Line.StippleFactor = CLAMP( factor, 1, 256 ); + ctx->Line.StippleFactor = factor; ctx->Line.StipplePattern = pattern; if (ctx->Driver.LineStipple) |