From 321f67c4729adeebd7aa9ef9e22c95e709952851 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Sat, 13 Jan 2001 05:48:25 +0000 Subject: Fix crash in book/stencil. Allow drivers to perform the perspective divide themselves. Assembly to do cliptesting without perspective divide for size-4 vectors. --- src/mesa/main/lines.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mesa/main/lines.c') diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c index 730e3f572f..8a9256c178 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) -- cgit v1.2.3