Module: Mesa Branch: mesa_7_7_branch Commit: 3ca6cb3440705ffec470beb601cdc0c22089e3f1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3ca6cb3440705ffec470beb601cdc0c22089e3f1
Author: Brian Paul <[email protected]> Date: Fri Feb 5 12:48:37 2010 -0700 softpipe: fix bug in perspective corrected interpolants for lines Thanks to Michal for finding this. This will get fixed on the gallium-cylindrical-wrap branch and then merged to master. --- src/gallium/drivers/softpipe/sp_setup.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c index 478d8ef..4cd11dd 100644 --- a/src/gallium/drivers/softpipe/sp_setup.c +++ b/src/gallium/drivers/softpipe/sp_setup.c @@ -805,7 +805,6 @@ line_persp_coeff(const struct setup_context *setup, struct tgsi_interp_coef *coef, uint vertSlot, uint i) { - /* XXX double-check/verify this arithmetic */ const float a0 = setup->vmin[vertSlot][i] * setup->vmin[0][3]; const float a1 = setup->vmax[vertSlot][i] * setup->vmax[0][3]; const float da = a1 - a0; @@ -813,7 +812,7 @@ line_persp_coeff(const struct setup_context *setup, const float dady = da * setup->emaj.dy * setup->oneoverarea; coef->dadx[i] = dadx; coef->dady[i] = dady; - coef->a0[i] = (setup->vmin[vertSlot][i] - + coef->a0[i] = (a0 - (dadx * (setup->vmin[0][0] - setup->pixel_offset) + dady * (setup->vmin[0][1] - setup->pixel_offset))); } _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
