diff options
author | brianp <brianp> | 2000-11-04 00:25:14 +0000 |
---|---|---|
committer | brianp <brianp> | 2000-11-04 00:25:14 +0000 |
commit | f7978541ae9d76c3b55ecd05e05506fecb1bdff2 (patch) | |
tree | a17d2df227551be1782231274f66d3377cc7280c | |
parent | 6a7e324d05756568be2d83845b3699d50f447a6c (diff) |
Fixed bugs in tex env combine setup (from tdfx-3-0-0 branch).
No software fallbacks for unsupported combine modes, however.
-rw-r--r-- | xc/lib/GL/mesa/src/drv/tdfx/fxsetup.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/xc/lib/GL/mesa/src/drv/tdfx/fxsetup.c b/xc/lib/GL/mesa/src/drv/tdfx/fxsetup.c index 5e4cd1958..b6db6dfa7 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/fxsetup.c +++ b/xc/lib/GL/mesa/src/drv/tdfx/fxsetup.c @@ -611,7 +611,7 @@ SetupTexEnvVoodoo3(GLcontext *ctx, FxU32 unit, GLboolean iteratedRGBA, (((operand) == GL_ONE_MINUS_SRC_ALPHA) \ || ((operand) == GL_ONE_MINUS_SRC_COLOR)) #define TEXENV_OPERAND_ALPHA(operand) \ - (((operand) == GL_ALPHA) || ((operand) == GL_ONE_MINUS_SRC_ALPHA)) + (((operand) == GL_SRC_ALPHA) || ((operand) == GL_ONE_MINUS_SRC_ALPHA)) #define TEXENV_SETUP_ARG_A(param, source, operand, iteratedAlpha) \ switch (source) { \ case GL_TEXTURE: \ @@ -635,7 +635,7 @@ SetupTexEnvVoodoo3(GLcontext *ctx, FxU32 unit, GLboolean iteratedRGBA, break; \ } -#define TEXENV_SETUP_ARG_RGB(param, source, operand, iteratedColor) \ +#define TEXENV_SETUP_ARG_RGB(param, source, operand, iteratedColor, iteratedAlpha) \ if (!TEXENV_OPERAND_ALPHA(operand)) { \ switch (source) { \ case GL_TEXTURE: \ @@ -670,7 +670,7 @@ SetupTexEnvVoodoo3(GLcontext *ctx, FxU32 unit, GLboolean iteratedRGBA, param = GR_CMBX_ITALPHA; \ break; \ case GL_PREVIOUS_EXT: \ - param = iteratedColor; \ + param = iteratedAlpha; \ break; \ default: \ /* \ @@ -982,7 +982,7 @@ SetupTexEnvNapalm(GLcontext *ctx, FxU32 unit, GLboolean useIteratedRGBA, TEXENV_SETUP_ARG_RGB(A_RGB, texUnit->CombineSourceRGB[0], texUnit->CombineOperandRGB[0], - incomingRGB); + incomingRGB, incomingAlpha); TEXENV_SETUP_MODE_RGB(Amode_RGB, texUnit->CombineOperandRGB[0]); B_RGB = C_RGB = D_RGB = GR_CMBX_ZERO; @@ -1000,7 +1000,7 @@ SetupTexEnvNapalm(GLcontext *ctx, FxU32 unit, GLboolean useIteratedRGBA, TEXENV_SETUP_ARG_RGB(A_RGB, texUnit->CombineSourceRGB[0], texUnit->CombineOperandRGB[0], - incomingRGB); + incomingRGB, incomingAlpha); TEXENV_SETUP_MODE_RGB(Amode_RGB, texUnit->CombineOperandRGB[0]); B_RGB = GR_CMBX_ZERO; @@ -1008,7 +1008,7 @@ SetupTexEnvNapalm(GLcontext *ctx, FxU32 unit, GLboolean useIteratedRGBA, TEXENV_SETUP_ARG_RGB(C_RGB, texUnit->CombineSourceRGB[1], texUnit->CombineOperandRGB[1], - incomingRGB); + incomingRGB, incomingAlpha); Cinv_RGB = TEXENV_OPERAND_INVERTED (texUnit->CombineOperandRGB[1]); D_RGB = GR_CMBX_ZERO; @@ -1021,15 +1021,15 @@ SetupTexEnvNapalm(GLcontext *ctx, FxU32 unit, GLboolean useIteratedRGBA, TEXENV_SETUP_ARG_RGB(A_RGB, texUnit->CombineSourceRGB[0], texUnit->CombineOperandRGB[0], - incomingRGB); + incomingRGB, incomingAlpha); TEXENV_SETUP_MODE_RGB(Amode_RGB, texUnit->CombineOperandRGB[0]); TEXENV_SETUP_ARG_RGB(B_RGB, texUnit->CombineSourceRGB[1], texUnit->CombineOperandRGB[1], - incomingRGB); + incomingRGB, incomingAlpha); TEXENV_SETUP_MODE_RGB(Bmode_RGB, - texUnit->CombineOperandRGB[0]); + texUnit->CombineOperandRGB[1]); C_RGB = D_RGB = GR_CMBX_ZERO; Cinv_RGB = FXTRUE; Dinv_RGB = Ginv_RGB = FXFALSE; @@ -1046,11 +1046,11 @@ SetupTexEnvNapalm(GLcontext *ctx, FxU32 unit, GLboolean useIteratedRGBA, TEXENV_SETUP_ARG_RGB(A_RGB, texUnit->CombineSourceRGB[0], texUnit->CombineOperandRGB[0], - incomingRGB); + incomingRGB, incomingAlpha); TEXENV_SETUP_ARG_RGB(B_RGB, texUnit->CombineSourceRGB[1], texUnit->CombineOperandRGB[1], - incomingRGB); + incomingRGB, incomingAlpha); if (!TEXENV_OPERAND_INVERTED(texUnit->CombineOperandRGB[0])) { /* * A is not inverted. So, choose it. @@ -1097,13 +1097,13 @@ SetupTexEnvNapalm(GLcontext *ctx, FxU32 unit, GLboolean useIteratedRGBA, TEXENV_SETUP_ARG_RGB(A_RGB, texUnit->CombineSourceRGB[0], texUnit->CombineOperandRGB[0], - incomingRGB); + incomingRGB, incomingAlpha); TEXENV_SETUP_MODE_RGB(Amode_RGB, texUnit->CombineOperandRGB[0]); TEXENV_SETUP_ARG_RGB(B_RGB, texUnit->CombineSourceRGB[1], texUnit->CombineOperandRGB[1], - incomingRGB); + incomingRGB, incomingAlpha); if (!TEXENV_OPERAND_INVERTED(texUnit->CombineOperandRGB[1])) { Bmode_RGB = GR_FUNC_MODE_NEGATIVE_X; } else { @@ -1121,7 +1121,7 @@ SetupTexEnvNapalm(GLcontext *ctx, FxU32 unit, GLboolean useIteratedRGBA, texUnit->CombineOperandRGB[2], incomingAlpha); Cinv_RGB = FXFALSE; - D_RGB = GR_CMBX_ZERO; + D_RGB = GR_CMBX_B; Dinv_RGB = Ginv_RGB = FXFALSE; break; default: |