llvmpipe: make nr_blocks unsigned
authorBrian Paul <brianp@vmware.com>
Tue, 1 Dec 2009 23:00:04 +0000 (16:00 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 1 Dec 2009 23:00:08 +0000 (16:00 -0700)
src/gallium/drivers/llvmpipe/lp_rast_priv.h
src/gallium/drivers/llvmpipe/lp_rast_tri.c

index 323c046cf46de4baa0c453475eb3e20915f46d8a..723bb5ad69596361074bce3bee0be4238a24c1d2 100644 (file)
@@ -75,7 +75,7 @@ struct lp_rasterizer {
       char clear_stencil;
    } state;
 
-   int nr_blocks;
+   unsigned nr_blocks;
    struct {
       unsigned x;
       unsigned y;
index 428870bb041c025f7035531c2123d523da4405bc..07b0eccf1e71d5049ee44cceadad8dbbdfca32ea 100644 (file)
@@ -44,7 +44,7 @@
 static void
 block_full_4( struct lp_rasterizer *rast, int x, int y )
 {
-   int i = rast->nr_blocks;
+   const unsigned i = rast->nr_blocks;
    assert(x % 4 == 0);
    assert(y % 4 == 0);
    rast->blocks[i].x = x;
@@ -97,7 +97,7 @@ do_block_4( struct lp_rasterizer *rast,
    /* As we do trivial reject already, masks should rarely be all zero:
     */
    if (mask) {
-      int i = rast->nr_blocks;
+      const unsigned i = rast->nr_blocks;
       rast->blocks[i].x = x;
       rast->blocks[i].y = y;
       rast->blocks[i].mask = mask;
@@ -169,7 +169,8 @@ lp_rast_triangle( struct lp_rasterizer *rast,
 
    int x = rast->x;
    int y = rast->y;
-   int ix, iy, i = 0;
+   int ix, iy;
+   unsigned i = 0;
 
    int c1 = tri->c1 + tri->dx12 * y - tri->dy12 * x;
    int c2 = tri->c2 + tri->dx23 * y - tri->dy23 * x;