Mesa (lp-binning): llvmpipe: change 'in' to boolean, add comments

Brian Paul brianp at kemper.freedesktop.org
Fri Jan 15 19:06:47 UTC 2010


Module: Mesa
Branch: lp-binning
Commit: 4bef3575e605d890d9f228391b4724d27b025f49
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4bef3575e605d890d9f228391b4724d27b025f49

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Jan 15 11:25:13 2010 -0700

llvmpipe: change 'in' to boolean, add comments

---

 src/gallium/drivers/llvmpipe/lp_setup_tri.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index 716b880..e7de643 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -441,7 +441,7 @@ do_triangle_ccw(struct setup_context *setup,
 	 int cx1 = c1;
 	 int cx2 = c2;
 	 int cx3 = c3;
-	 int in = 0;
+	 boolean in = FALSE;  /* are we inside the triangle? */
 
 	 for (x = minx; x <= maxx; x++)
 	 {
@@ -451,13 +451,13 @@ do_triangle_ccw(struct setup_context *setup,
 	    {
 	       /* do nothing */
 	       if (in)
-		  break;
+		  break;  /* exiting triangle, all done with this row */
 	    }
 	    else if (cx1 + ei1 > 0 &&
 		     cx2 + ei2 > 0 &&
 		     cx3 + ei3 > 0) 
 	    {
-	       in = 1;
+	       in = TRUE;
                /* triangle covers the whole tile- shade whole tile */
 	       if(setup->fs.current.opaque) {
 	          lp_scene_bin_reset( scene, x, y );
@@ -471,7 +471,7 @@ do_triangle_ccw(struct setup_context *setup,
 	    }
 	    else 
 	    { 
-	       in = 1;
+	       in = TRUE;
                /* shade partial tile */
                lp_scene_bin_command( scene, x, y,
 				     lp_rast_triangle, 




More information about the mesa-commit mailing list