X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fllvmpipe%2Flp_rast.h;h=49da41f0e5e2d789721c062eb4edfedfb871e633;hb=437ab1d6df7282770ee869180446db36c2dbdfa8;hp=a64c152cf8317164292e7eee36475a8f444bcb6e;hpb=dbf3a15313eed930a3d8fdde12e457259c43651b;p=mesa.git 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 ) {