summaryrefslogtreecommitdiff
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-07-21 20:52:43 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-07-21 20:52:43 +0000
commita7722cb794be008f930c5f071f66fc14b38af65a (patch)
tree0c49048de59d00268a2e8c9220f6510f51eca8b8 /src/mesa/swrast
parentc28399baa76e515a7e9d22ef39a5d22c4b73f848 (diff)
load SLANG_FRAGMENT_FIXED_SECONDARYCOLOR
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_arbshader.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_arbshader.c b/src/mesa/swrast/s_arbshader.c
index 88a9374cd3..a2dc1353f0 100644
--- a/src/mesa/swrast/s_arbshader.c
+++ b/src/mesa/swrast/s_arbshader.c
@@ -61,12 +61,21 @@ _swrast_exec_arbshader(GLcontext *ctx, struct sw_span *span)
vec[3] = span->w + span->dwdx * i;
(**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_FRAGCOORD, vec,
0, 4 * sizeof(GLfloat), GL_TRUE);
+
vec[0] = CHAN_TO_FLOAT(span->array->rgba[i][RCOMP]);
vec[1] = CHAN_TO_FLOAT(span->array->rgba[i][GCOMP]);
vec[2] = CHAN_TO_FLOAT(span->array->rgba[i][BCOMP]);
vec[3] = CHAN_TO_FLOAT(span->array->rgba[i][ACOMP]);
(**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_COLOR, vec, 0,
4 * sizeof(GLfloat), GL_TRUE);
+
+ vec[0] = CHAN_TO_FLOAT(span->array->spec[i][RCOMP]);
+ vec[1] = CHAN_TO_FLOAT(span->array->spec[i][GCOMP]);
+ vec[2] = CHAN_TO_FLOAT(span->array->spec[i][BCOMP]);
+ vec[3] = CHAN_TO_FLOAT(span->array->spec[i][ACOMP]);
+ (**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_SECONDARYCOLOR,
+ vec, 0, 4 * sizeof(GLfloat), GL_TRUE);
+
for (j = 0; j < ctx->Const.MaxTextureCoordUnits; j++) {
vec[0] = span->array->texcoords[j][i][0];
vec[1] = span->array->texcoords[j][i][1];
@@ -75,6 +84,7 @@ _swrast_exec_arbshader(GLcontext *ctx, struct sw_span *span)
(**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_TEXCOORD,
vec, j, 4 * sizeof(GLfloat), GL_TRUE);
}
+
for (j = 0; j < MAX_VARYING_VECTORS; j++) {
GLuint k;