summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw/draw_clip.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-07-12 10:43:33 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-07-12 10:43:33 -0600
commit5b06424a1507dadad8832d557e79f68a3b68b9c2 (patch)
treef43b7a5306620802347b64f7f2e932a4b199a52e /src/mesa/pipe/draw/draw_clip.c
parent2371ed36f7761c4fa452e51a41947ed34f2b661b (diff)
fix MIN/MAX mix-up
Diffstat (limited to 'src/mesa/pipe/draw/draw_clip.c')
-rw-r--r--src/mesa/pipe/draw/draw_clip.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/pipe/draw/draw_clip.c b/src/mesa/pipe/draw/draw_clip.c
index a1c4cf01f0..619ad7d6d6 100644
--- a/src/mesa/pipe/draw/draw_clip.c
+++ b/src/mesa/pipe/draw/draw_clip.c
@@ -25,9 +25,13 @@
*
**************************************************************************/
-/* Authors: Keith Whitwell <keith@tungstengraphics.com>
+/**
+ * \brief Clipping stage
+ *
+ * \author Keith Whitwell <keith@tungstengraphics.com>
*/
+
#include "main/macros.h"
#include "draw_private.h"
@@ -322,12 +326,12 @@ do_clip_line( struct prim_stage *stage,
if (dp1 < 0) {
GLfloat t = dp1 / (dp1 - dp0);
- t1 = MIN2(t1, t);
+ t1 = MAX2(t1, t);
}
if (dp0 < 0) {
GLfloat t = dp0 / (dp0 - dp1);
- t0 = MIN2(t0, t);
+ t0 = MAX2(t0, t);
}
if (t0 + t1 >= 1.0)