summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/swrast/s_tritemp.h9
-rw-r--r--src/mesa/swrast/swrast.h2
-rw-r--r--src/mesa/swrast_setup/ss_context.c2
3 files changed, 7 insertions, 6 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;
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index 924b423e88..f17e69bfb2 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -156,7 +156,7 @@ _swsetup_RenderStart( GLcontext *ctx )
for (i = 0; i < ctx->Const.MaxVarying; i++) {
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_GENERIC(i) )) {
EMIT_ATTR( _TNL_ATTRIB_GENERIC(i), VARYING_EMIT_STYLE,
- attribute[i] );
+ varying[i] );
}
}
}