llvmpipe: Ensure the 16x16 special rasterization path does not touch outside the...
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 5 Oct 2011 10:31:15 +0000 (11:31 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 5 Oct 2011 17:07:05 +0000 (18:07 +0100)
commitc620087432b2055aa9301f19f8b6444080698c90
tree7950a03f39959a41913dded80267a19b0e316faa
parent9c697a9d004da4aa7a26d3bda17cc473f50345ea
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.
src/gallium/drivers/llvmpipe/lp_rast.c
src/gallium/drivers/llvmpipe/lp_rast_priv.h
src/gallium/drivers/llvmpipe/lp_rast_tri.c
src/gallium/drivers/llvmpipe/lp_setup_tri.c