summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2006-12-15 10:09:49 -0700
committerBrian <[email protected]>2006-12-15 10:09:49 -0700
commit464b9f4f6c6514a7cfcc873923b5c127c1c6f60b (patch)
treecce52a4ac2939dd3da55147d9f313ee73be36977
parent9abf73b8cc204a9348c751022bace78560d7cb3e (diff)
varying var changes
-rw-r--r--src/mesa/swrast/s_context.h8
-rw-r--r--src/mesa/swrast/s_span.c4
-rw-r--r--src/mesa/swrast/s_tritemp.h22
3 files changed, 17 insertions, 17 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 37d7081d4d6..f784e18cd43 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -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;
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index f0918878388..7bfb23f0f74 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -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;
diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h
index 9e0a8a3d32a..0ed1772a886 100644
--- a/src/mesa/swrast/s_tritemp.h
+++ b/src/mesa/swrast/s_tritemp.h
@@ -144,14 +144,14 @@
#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++) {