Mesa (master): swrast: fix bad optimization check
Brian Paul
brianp at kemper.freedesktop.org
Thu Apr 2 02:25:45 UTC 2009
Module: Mesa
Branch: master
Commit: 84b24efe8dc1bd67680f4d3c656fb4693fd405c1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=84b24efe8dc1bd67680f4d3c656fb4693fd405c1
Author: Brian Paul <brianp at vmware.com>
Date: Tue Mar 10 19:29:45 2009 -0600
swrast: fix bad optimization check
---
src/mesa/swrast/s_texcombine.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index 3b7bbfe..ef2db0d 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]);
More information about the mesa-commit
mailing list