Module: Mesa Branch: llvmpipe-rast-64 Commit: 982b5e84b4bebc765bf1b49ead5e2c68291a3e31 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=982b5e84b4bebc765bf1b49ead5e2c68291a3e31
Author: José Fonseca <[email protected]> Date: Tue Oct 29 13:05:07 2013 +0000 llvmpipe: Try 32-bits dcdx/dcdy. Should work in theory, and it doesn't seem to make things any worse in practice. However triangle-rasterization-overdraw fails with or without this. --- src/gallium/drivers/llvmpipe/lp_rast.h | 5 +++++ src/gallium/drivers/llvmpipe/lp_setup_tri.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h index 6a94150..56ede0d 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.h +++ b/src/gallium/drivers/llvmpipe/lp_rast.h @@ -111,8 +111,13 @@ struct lp_rast_plane { /* edge function values at minx,miny ?? */ int64_t c; +#if 0 int64_t dcdx; int64_t dcdy; +#else + int32_t dcdx; + int32_t dcdy; +#endif /* one-pixel sized trivial reject offsets for each plane */ int64_t eo; diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index 5897937..c6add87 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -464,8 +464,12 @@ do_triangle_ccw(struct lp_setup_context *setup, } } - plane[i].dcdx *= FIXED_ONE; - plane[i].dcdy *= FIXED_ONE; + /* Scale up to match c: + */ + assert((plane[i].dcdx << FIXED_ORDER) >> FIXED_ORDER == plane[i].dcdx); + assert((plane[i].dcdy << FIXED_ORDER) >> FIXED_ORDER == plane[i].dcdy); + plane[i].dcdx <<= FIXED_ORDER; + plane[i].dcdy <<= FIXED_ORDER; /* find trivial reject offsets for each edge for a single-pixel * sized block. These will be scaled up at each recursive level to _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
