diff options
author | José Fonseca <[email protected]> | 2011-10-05 11:31:15 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2011-10-05 18:07:05 +0100 |
commit | c620087432b2055aa9301f19f8b6444080698c90 (patch) | |
tree | 7950a03f39959a41913dded80267a19b0e316faa /src/gallium/drivers/llvmpipe/lp_rast.c | |
parent | 9c697a9d004da4aa7a26d3bda17cc473f50345ea (diff) |
llvmpipe: Ensure the 16x16 special rasterization path does not touch outside the tile.
llvmpipe has a few special rasterization paths for triangles contained in
16x16 blocks, but it allows the 16x16 block to be aligned only to a 4x4
grid.
Some 16x16 blocks could actually intersect the tile
if the triangle is 16 pixels in one dimension but 4 in the other, causing
a buffer overflow.
The fix consists of budging the 16x16 blocks back inside the tile.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 131785852c8..c4560bfe6c0 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -436,6 +436,8 @@ lp_rast_shade_quads_mask(struct lp_rasterizer_task *task, assert(state); /* Sanity checks */ + assert(x < scene->tiles_x * TILE_SIZE); + assert(y < scene->tiles_y * TILE_SIZE); assert(x % TILE_VECTOR_WIDTH == 0); assert(y % TILE_VECTOR_HEIGHT == 0); |