diff options
author | Brian Paul <[email protected]> | 2009-12-01 16:24:57 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-12-01 16:25:00 -0700 |
commit | 63fe997e28b5bfee1f776a220d121987a5fee62e (patch) | |
tree | 918c65120dc419e27c5c5c1f1b89c598fc7f0e78 /src/gallium | |
parent | 9c486774913f66c6496cd43cfd9dbd992c28d8cb (diff) |
llvmpipe: added assertions
And remove unused BLOCKSIZE.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast_tri.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri.c b/src/gallium/drivers/llvmpipe/lp_rast_tri.c index f6cb628ed4b..e772a0158a6 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_rast_tri.c @@ -34,9 +34,6 @@ #include "lp_tile_soa.h" -#define BLOCKSIZE 4 - - /** * Add a 4x4 block of pixels to the block list. * All pixels are known to be inside the triangle's bounds. @@ -186,6 +183,8 @@ lp_rast_triangle( struct lp_rasterizer *rast, int eo2 = tri->eo2 * 16; int eo3 = tri->eo3 * 16; + assert(Elements(rast->blocks) == (TILE_SIZE * TILE_SIZE) / (4*4)); + debug_printf("%s\n", __FUNCTION__); rast->nr_blocks = 0; @@ -218,6 +217,8 @@ lp_rast_triangle( struct lp_rasterizer *rast, } } + assert(rast->nr_blocks <= Elements(rast->blocks)); + /* Shade the 4x4 pixel blocks */ for (i = 0; i < rast->nr_blocks; i++) lp_rast_shade_quads(rast, &tri->inputs, |