From: Brian Date: Thu, 12 Jul 2007 16:43:33 +0000 (-0600) Subject: fix MIN/MAX mix-up X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5b06424a1507dadad8832d557e79f68a3b68b9c2;p=mesa.git fix MIN/MAX mix-up --- diff --git a/src/mesa/pipe/draw/draw_clip.c b/src/mesa/pipe/draw/draw_clip.c index a1c4cf01f05..619ad7d6d64 100644 --- a/src/mesa/pipe/draw/draw_clip.c +++ b/src/mesa/pipe/draw/draw_clip.c @@ -25,9 +25,13 @@ * **************************************************************************/ -/* Authors: Keith Whitwell +/** + * \brief Clipping stage + * + * \author Keith Whitwell */ + #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)