* 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
#ifdef INTERP_VARYING
+/* XXX need a varyingEnabled[] check */
#define VARYING_LOOP(CODE) \
{ \
GLuint iv, ic; \
/* 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);
)
#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];