varying var changes
authorBrian <brian@yutani.localnet.net>
Fri, 15 Dec 2006 17:09:49 +0000 (10:09 -0700)
committerBrian <brian@yutani.localnet.net>
Fri, 15 Dec 2006 17:09:49 +0000 (10:09 -0700)
src/mesa/swrast/s_context.h
src/mesa/swrast/s_span.c
src/mesa/swrast/s_tritemp.h

index 37d7081d4d66ad73bfa6e26a075cca3e6800dd85..f784e18cd43e42de107c1ded03ae934c2acd948e 100644 (file)
@@ -122,7 +122,7 @@ typedef struct sw_span_arrays {
    GLfloat texcoords[MAX_TEXTURE_COORD_UNITS][MAX_WIDTH][4];
    GLfloat lambda[MAX_TEXTURE_COORD_UNITS][MAX_WIDTH];
    GLfloat coverage[MAX_WIDTH];
-   GLfloat varying[MAX_WIDTH][MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR];
+   GLfloat varying[MAX_WIDTH][MAX_VARYING][4];
 
    /** This mask indicates which fragments are alive or culled */
    GLubyte mask[MAX_WIDTH];
@@ -200,9 +200,9 @@ typedef struct sw_span {
    GLfloat texStepX[MAX_TEXTURE_COORD_UNITS][4];
    GLfloat texStepY[MAX_TEXTURE_COORD_UNITS][4];
    GLfixed intTex[2], intTexStep[2];  /* s, t only */
-   GLfloat var[MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR];
-   GLfloat varStepX[MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR];
-   GLfloat varStepY[MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR];
+   GLfloat var[MAX_VARYING][4];
+   GLfloat varStepX[MAX_VARYING][4];
+   GLfloat varStepY[MAX_VARYING][4];
 
    /* partial derivatives wrt X and Y. */
    GLfloat dzdx, dzdy;
index f0918878388b83348210d88bb41f6b94ab21522a..7bfb23f0f7450161219954ff4ffd4348b8ea2389 100644 (file)
@@ -829,8 +829,8 @@ interpolate_varying(GLcontext *ctx, SWspan *span)
 
    span->arrayMask |= SPAN_VARYING;
 
-   for (i = 0; i < MAX_VARYING_VECTORS; i++) {
-      for (j = 0; j < VARYINGS_PER_VECTOR; j++) {
+   for (i = 0; i < MAX_VARYING; i++) {
+      for (j = 0; j < 4; j++) {
          const GLfloat dvdx = span->varStepX[i][j];
          GLfloat v = span->var[i][j];
          const GLfloat dwdx = span->dwdx;
index 9e0a8a3d32a1afc799a8c5552ca8d5067e634dfe..0ed1772a886f2d0b39ca2e9cfa789734aa4607ce 100644 (file)
 
 
 #ifdef INTERP_VARYING
-#define VARYING_LOOP(CODE)\
-   {\
-      GLuint iv, ic;\
-      for (iv = 0; iv < MAX_VARYING_VECTORS; iv++) {\
-         for (ic = 0; ic < VARYINGS_PER_VECTOR; ic++) {\
-            CODE\
-         }\
-      }\
+#define VARYING_LOOP(CODE)                     \
+   {                                           \
+      GLuint iv, ic;                           \
+      for (iv = 0; iv < MAX_VARYING; iv++) {   \
+         for (ic = 0; ic < 4; ic++) {          \
+            CODE                               \
+         }                                     \
+      }                                        \
    }
 #endif
 
@@ -780,9 +780,9 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
          GLfloat dvOuter[MAX_TEXTURE_COORD_UNITS], dvInner[MAX_TEXTURE_COORD_UNITS];
 #endif
 #ifdef INTERP_VARYING
-         GLfloat varLeft[MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR];
-         GLfloat dvarOuter[MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR];
-         GLfloat dvarInner[MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR];
+         GLfloat varLeft[MAX_VARYING][4];
+         GLfloat dvarOuter[MAX_VARYING][4];
+         GLfloat dvarInner[MAX_VARYING][4];
 #endif
 
          for (subTriangle=0; subTriangle<=1; subTriangle++) {