summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-03-10 19:29:45 -0600
committerBrian Paul <[email protected]>2009-04-01 20:24:22 -0600
commit84b24efe8dc1bd67680f4d3c656fb4693fd405c1 (patch)
treed1801b30f3ea5e718ed8673163412fc292007375 /src/mesa
parent0d8d90482331b219b861e500a0bc830133b1b377 (diff)
swrast: fix bad optimization check
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/swrast/s_texcombine.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index 3b7bbfe2583..ef2db0dc7e3 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -604,7 +604,8 @@ texture_apply( const GLcontext *ctx,
format = texUnit->_Current->DepthMode;
}
- if (texUnit->EnvMode != GL_REPLACE) {
+ /* skip chan->float conversion when not needed */
+ if (texUnit->EnvMode != GL_REPLACE || format != GL_RGBA) {
/* convert GLchan colors to GLfloat */
for (i = 0; i < n; i++) {
rgba[i][RCOMP] = CHAN_TO_FLOAT(rgbaChan[i][RCOMP]);