summaryrefslogtreecommitdiff
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian <brian@nostromo.localnet.net>2006-12-21 17:50:07 -0700
committerBrian <brian@nostromo.localnet.net>2006-12-21 17:50:07 -0700
commiteb2a6d62f9353d90be757fc1617040c7ccddac39 (patch)
treee9c5bb2babf1f53979f288ccfb52c958a75fd7e8 /src/mesa/swrast
parent2905385744a385bc8bc6cbd2d749673c93380462 (diff)
s/attribute/varying/
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_tritemp.h9
-rw-r--r--src/mesa/swrast/swrast.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h
index 0ed1772a88..c85379b4b1 100644
--- a/src/mesa/swrast/s_tritemp.h
+++ b/src/mesa/swrast/s_tritemp.h
@@ -41,7 +41,7 @@
* INTERP_TEX - if defined, interpolate set 0 float STRQ texcoords
* NOTE: OpenGL STRQ = Mesa STUV (R was taken for red)
* INTERP_MULTITEX - if defined, interpolate N units of STRQ texcoords
- * INTERP_VARYING - if defined, interpolate M floats of GLSL varyings
+ * INTERP_VARYING - if defined, interpolate M GLSL varyings
*
* When one can directly address pixels in the color buffer the following
* macros can be defined and used to compute pixel addresses during
@@ -144,6 +144,7 @@
#ifdef INTERP_VARYING
+/* XXX need a varyingEnabled[] check */
#define VARYING_LOOP(CODE) \
{ \
GLuint iv, ic; \
@@ -669,8 +670,8 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
/* win[3] is 1/W */
const GLfloat wMax = vMax->win[3], wMin = vMin->win[3], wMid = vMid->win[3];
VARYING_LOOP(
- GLfloat eMaj_dvar = vMax->attribute[iv][ic] * wMax - vMin->attribute[iv][ic] * wMin;
- GLfloat eBot_dvar = vMid->attribute[iv][ic] * wMid - vMin->attribute[iv][ic] * wMin;
+ GLfloat eMaj_dvar = vMax->varying[iv][ic] * wMax - vMin->varying[iv][ic] * wMin;
+ GLfloat eBot_dvar = vMid->varying[iv][ic] * wMid - vMin->varying[iv][ic] * wMin;
span.varStepX[iv][ic] = oneOverArea * (eMaj_dvar * eBot.dy - eMaj.dy * eBot_dvar);
span.varStepY[iv][ic] = oneOverArea * (eMaj.dx * eBot_dvar - eMaj_dvar * eBot.dx);
)
@@ -1060,7 +1061,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
#ifdef INTERP_VARYING
VARYING_LOOP(
const GLfloat invW = vLower->win[3];
- const GLfloat var0 = vLower->attribute[iv][ic] * invW;
+ const GLfloat var0 = vLower->varying[iv][ic] * invW;
varLeft[iv][ic] = var0 + (span.varStepX[iv][ic] * adjx +
span.varStepY[iv][ic] * adjy) * (1.0f / FIXED_SCALE);
dvarOuter[iv][ic] = span.varStepY[iv][ic] + dxOuter * span.varStepX[iv][ic];
diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h
index 09686c8380..2c1c0952af 100644
--- a/src/mesa/swrast/swrast.h
+++ b/src/mesa/swrast/swrast.h
@@ -73,7 +73,7 @@ typedef struct {
GLfloat fog;
GLfloat index;
GLfloat pointSize;
- GLfloat attribute[MAX_VERTEX_ATTRIBS][4];
+ GLfloat varying[MAX_VERTEX_ATTRIBS][4];
} SWvertex;