s/attribute/varying/
authorBrian <brian@nostromo.localnet.net>
Fri, 22 Dec 2006 00:50:07 +0000 (17:50 -0700)
committerBrian <brian@nostromo.localnet.net>
Fri, 22 Dec 2006 00:50:07 +0000 (17:50 -0700)
src/mesa/swrast/s_tritemp.h
src/mesa/swrast/swrast.h
src/mesa/swrast_setup/ss_context.c

index 0ed1772a886f2d0b39ca2e9cfa789734aa4607ce..c85379b4b1681baaf3d80a19e94c23966400114f 100644 (file)
@@ -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
 
 
 #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];
index 09686c8380aaf04356f5eb9c38f46e2fb52ffefd..2c1c0952afc22ffb325bcdb98c515cb6484e34ba 100644 (file)
@@ -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;
 
 
index 924b423e886e7fafb61d920f7a8a689ac89f4326..f17e69bfb2f7e9aa83ec9fc66fe3fef33bc11851 100644 (file)
@@ -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] );
             }
          }
       }