diff options
author | José Fonseca <[email protected]> | 2011-10-05 13:27:08 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2011-10-05 18:07:05 +0100 |
commit | e2072a1046039403d814613553e7b3b563d43dfc (patch) | |
tree | 6b3eaca75fd515731540860e73c4f33da1329aa6 /src/gallium/drivers/llvmpipe/lp_rast.h | |
parent | c620087432b2055aa9301f19f8b6444080698c90 (diff) |
llvmpipe: Fix the 4 planes (lines) case properly.
The previous change was not effective for lines, because there is no
4 planes 4x4 block rasterization path: it is handled by the 16x16 block
case too, and the 16x16 block was not being budged as it should.
This fixes assertion failures on line rasterization.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h index a64c152cf83..49da41f0e5e 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.h +++ b/src/gallium/drivers/llvmpipe/lp_rast.h @@ -183,6 +183,22 @@ lp_rast_arg_triangle( const struct lp_rast_triangle *triangle, return arg; } +/** + * Build argument for a contained triangle. + * + * All planes are enabled, so instead of the plane mask we pass the upper + * left coordinates of the a block that fully encloses the triangle. + */ +static INLINE union lp_rast_cmd_arg +lp_rast_arg_triangle_contained( const struct lp_rast_triangle *triangle, + unsigned x, unsigned y) +{ + union lp_rast_cmd_arg arg; + arg.triangle.tri = triangle; + arg.triangle.plane_mask = x | (y << 8); + return arg; +} + static INLINE union lp_rast_cmd_arg lp_rast_arg_state( const struct lp_rast_state *state ) { |