summaryrefslogtreecommitdiff
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-04-06 21:37:20 -0600
committerBrian Paul <brianp@vmware.com>2009-04-06 21:37:20 -0600
commit3630da9916a4f24a03d3a63420690f8016a9b72a (patch)
tree1f78dccc059bfac5b9d6283c54e9d8c0113146ea /src/mesa/swrast
parent1b2ab023673261b4b942e1126c0b599d02fbd4a0 (diff)
swrast: more texcombine clean-ups
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_texcombine.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index cec89ed245..fae7280efb 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -405,22 +405,20 @@ texture_combine( GLcontext *ctx, GLuint unit, GLuint n,
}
break;
case GL_BUMP_ENVMAP_ATI:
- {
- /* this produces a fixed rgba color, and the coord calc is done elsewhere */
- for (i = 0; i < n; i++) {
+ /* this produces a fixed rgba color, and the coord calc is done elsewhere */
+ for (i = 0; i < n; i++) {
/* rgba result is 0,0,0,1 */
#if CHAN_TYPE == GL_FLOAT
- rgba[i][RCOMP] = 0.0;
- rgba[i][GCOMP] = 0.0;
- rgba[i][BCOMP] = 0.0;
- rgba[i][ACOMP] = 1.0;
+ rgba[i][RCOMP] = 0.0;
+ rgba[i][GCOMP] = 0.0;
+ rgba[i][BCOMP] = 0.0;
+ rgba[i][ACOMP] = 1.0;
#else
- rgba[i][RCOMP] = 0;
- rgba[i][GCOMP] = 0;
- rgba[i][BCOMP] = 0;
- rgba[i][ACOMP] = CHAN_MAX;
+ rgba[i][RCOMP] = 0;
+ rgba[i][GCOMP] = 0;
+ rgba[i][BCOMP] = 0;
+ rgba[i][ACOMP] = CHAN_MAX;
#endif
- }
}
return; /* no alpha processing */
default:
@@ -642,19 +640,10 @@ _swrast_texture_span( GLcontext *ctx, SWspan *span )
not sure this can work correctly even ignoring
the problem that channel is unsigned */
for (i = 0; i < span->end; i++) {
-#if CHAN_TYPE == GL_FLOAT
targetcoords[i][0] += (texels[i][0] * rotMatrix00 + texels[i][1] *
rotMatrix01) / targetcoords[i][3];
targetcoords[i][1] += (texels[i][0] * rotMatrix10 + texels[i][1] *
rotMatrix11) / targetcoords[i][3];
-#else
- targetcoords[i][0] += (CHAN_TO_FLOAT(texels[i][1]) * rotMatrix00 +
- CHAN_TO_FLOAT(texels[i][1]) * rotMatrix01) /
- targetcoords[i][3];
- targetcoords[i][1] += (CHAN_TO_FLOAT(texels[i][0]) * rotMatrix10 +
- CHAN_TO_FLOAT(texels[i][1]) * rotMatrix11) /
- targetcoords[i][3];
-#endif
}
}
}