summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-05-02 08:48:20 -0600
committerBrian <[email protected]>2007-05-02 08:48:20 -0600
commit99f24c8d17f3a39ff0ebbeb1f7fa80142d8be648 (patch)
treec84c4139295f13c8c92ea822c6221983aefbd23e /src
parent04c401c91ea288e8a4d2c501b6e24c3ecbc83664 (diff)
fix some StepX/StepY mix-ups in alpha interpolation
Diffstat (limited to 'src')
-rw-r--r--src/mesa/swrast/s_tritemp.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h
index b8601bd5b4b..dcc3e958cb1 100644
--- a/src/mesa/swrast/s_tritemp.h
+++ b/src/mesa/swrast/s_tritemp.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.3
+ * Version: 7.0
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -499,7 +499,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
# endif /* GL_FLOAT */
# ifdef INTERP_ALPHA
span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da);
- span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx);
+ span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx);
# if CHAN_TYPE == GL_FLOAT
span.alphaStep = span.attrStepX[FRAG_ATTRIB_COL0][3];
# else
@@ -523,7 +523,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
span.blueStep = 0;
# endif /* GL_FLOAT */
# ifdef INTERP_ALPHA
- span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepX[FRAG_ATTRIB_COL0][3] = 0.0F;
+ span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F;
# if CHAN_TYPE == GL_FLOAT
span.alphaStep = 0.0F;
# else
@@ -893,11 +893,11 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
# endif
# ifdef INTERP_ALPHA
# if CHAN_TYPE == GL_FLOAT
- aLeft = vLower->color[ACOMP] + (span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjy) * (1.0F / FIXED_SCALE);
- fdaOuter = span.attrStepX[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3];
+ aLeft = vLower->color[ACOMP] + (span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) * (1.0F / FIXED_SCALE);
+ fdaOuter = span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3];
# else
aLeft = (GLint)(ChanToFixed(vLower->color[ACOMP]) + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjy) + FIXED_HALF;
- fdaOuter = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]);
+ fdaOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]);
# endif
# endif
}