Mesa (master): fix bug in perspective corrected interpolants for lines
MichaŠKról
michal at kemper.freedesktop.org
Tue Feb 9 14:35:34 UTC 2010
Module: Mesa
Branch: master
Commit: a1a441179bacdd33e83a48651c7a7a2cc4a8a665
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a1a441179bacdd33e83a48651c7a7a2cc4a8a665
Author: Brian Paul <brianp at vmware.com>
Date: Fri Feb 5 12:57:11 2010 -0700
fix bug in perspective corrected interpolants for lines
---
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 9036f32..b8590a8 100644
--- a/src/gallium/drivers/softpipe/sp_setup.c
+++ b/src/gallium/drivers/softpipe/sp_setup.c
@@ -908,7 +908,6 @@ line_persp_coeff(const struct setup_context *setup,
uint i,
const float v[2])
{
- /* XXX double-check/verify this arithmetic */
const float a0 = v[0] * setup->vmin[0][3];
const float a1 = v[1] * setup->vmax[0][3];
const float da = a1 - a0;
@@ -916,7 +915,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] = (v[0] - /* XXX: <-- shouldn't that be a0? */
+ coef->a0[i] = (a0 -
(dadx * (setup->vmin[0][0] - setup->pixel_offset) +
dady * (setup->vmin[0][1] - setup->pixel_offset)));
}
More information about the mesa-commit
mailing list