aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_texcombine.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-02 14:47:58 +0000
committermarha <marha@users.sourceforge.net>2010-04-02 14:47:58 +0000
commit7933658107276f9d5491f8736a743cf8f8bbd5f2 (patch)
treef2893a761364e7abc9d934e9c5427e5cf5190c7a /mesalib/src/mesa/swrast/s_texcombine.c
parent83fa9a9811e2c18cffd83a020757f7fb51ffddaa (diff)
downloadvcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.tar.gz
vcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.tar.bz2
vcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.zip
Updated to following packages:
mesa-7.8
Diffstat (limited to 'mesalib/src/mesa/swrast/s_texcombine.c')
-rw-r--r--mesalib/src/mesa/swrast/s_texcombine.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/mesalib/src/mesa/swrast/s_texcombine.c b/mesalib/src/mesa/swrast/s_texcombine.c
index 889164b98..f322663ad 100644
--- a/mesalib/src/mesa/swrast/s_texcombine.c
+++ b/mesalib/src/mesa/swrast/s_texcombine.c
@@ -29,7 +29,6 @@
#include "main/colormac.h"
#include "main/image.h"
#include "main/imports.h"
-#include "main/pixel.h"
#include "shader/prog_instruction.h"
#include "s_context.h"
@@ -317,18 +316,18 @@ texture_combine( GLcontext *ctx, GLuint unit, GLuint n,
/* (a * b) + (c * d) - 0.5 */
for (i = 0; i < n; i++) {
rgba[i][RCOMP] = (arg0[i][RCOMP] * arg1[i][RCOMP] +
- arg2[i][RCOMP] * arg3[i][RCOMP] - 0.5) * scaleRGB;
+ arg2[i][RCOMP] * arg3[i][RCOMP] - 0.5F) * scaleRGB;
rgba[i][GCOMP] = (arg0[i][GCOMP] * arg1[i][GCOMP] +
- arg2[i][GCOMP] * arg3[i][GCOMP] - 0.5) * scaleRGB;
+ arg2[i][GCOMP] * arg3[i][GCOMP] - 0.5F) * scaleRGB;
rgba[i][BCOMP] = (arg0[i][BCOMP] * arg1[i][BCOMP] +
- arg2[i][BCOMP] * arg3[i][BCOMP] - 0.5) * scaleRGB;
+ arg2[i][BCOMP] * arg3[i][BCOMP] - 0.5F) * scaleRGB;
}
}
else {
for (i = 0; i < n; i++) {
- rgba[i][RCOMP] = (arg0[i][RCOMP] + arg1[i][RCOMP] - 0.5) * scaleRGB;
- rgba[i][GCOMP] = (arg0[i][GCOMP] + arg1[i][GCOMP] - 0.5) * scaleRGB;
- rgba[i][BCOMP] = (arg0[i][BCOMP] + arg1[i][BCOMP] - 0.5) * scaleRGB;
+ rgba[i][RCOMP] = (arg0[i][RCOMP] + arg1[i][RCOMP] - 0.5F) * scaleRGB;
+ rgba[i][GCOMP] = (arg0[i][GCOMP] + arg1[i][GCOMP] - 0.5F) * scaleRGB;
+ rgba[i][BCOMP] = (arg0[i][BCOMP] + arg1[i][BCOMP] - 0.5F) * scaleRGB;
}
}
break;
@@ -369,7 +368,7 @@ texture_combine( GLcontext *ctx, GLuint unit, GLuint n,
(arg0[i][GCOMP] - 0.5F) * (arg1[i][GCOMP] - 0.5F) +
(arg0[i][BCOMP] - 0.5F) * (arg1[i][BCOMP] - 0.5F))
* 4.0F * scaleRGB;
- dot = CLAMP(dot, 0.0, 1.0F);
+ dot = CLAMP(dot, 0.0F, 1.0F);
rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = dot;
}
break;
@@ -386,11 +385,11 @@ texture_combine( GLcontext *ctx, GLuint unit, GLuint n,
case GL_MODULATE_SIGNED_ADD_ATI:
for (i = 0; i < n; i++) {
rgba[i][RCOMP] = ((arg0[i][RCOMP] * arg2[i][RCOMP]) +
- arg1[i][RCOMP] - 0.5) * scaleRGB;
+ arg1[i][RCOMP] - 0.5F) * scaleRGB;
rgba[i][GCOMP] = ((arg0[i][GCOMP] * arg2[i][GCOMP]) +
- arg1[i][GCOMP] - 0.5) * scaleRGB;
+ arg1[i][GCOMP] - 0.5F) * scaleRGB;
rgba[i][BCOMP] = ((arg0[i][BCOMP] * arg2[i][BCOMP]) +
- arg1[i][BCOMP] - 0.5) * scaleRGB;
+ arg1[i][BCOMP] - 0.5F) * scaleRGB;
}
break;
case GL_MODULATE_SUBTRACT_ATI:
@@ -457,7 +456,7 @@ texture_combine( GLcontext *ctx, GLuint unit, GLuint n,
for (i = 0; i < n; i++) {
rgba[i][ACOMP] = (arg0[i][ACOMP] * arg1[i][ACOMP] +
arg2[i][ACOMP] * arg3[i][ACOMP] -
- 0.5) * scaleA;
+ 0.5F) * scaleA;
}
}
else {