summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-02-06 20:01:36 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-02-06 20:01:36 +0000
commit397c9dd3755b595777faa426edf4c343e4f2e484 (patch)
treed8e3a5ba20952dfd467ce7d7d5d229e9ab703059 /src
parentb79d289bded99e78e6ef64c5f8c4c71770b0e145 (diff)
in fxSelectSingleTMUSrc_NoLock(), added check for haveTwoTMUs (Neal Tringham)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/glide/fxsetup.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c
index 306353930c..c116522c4b 100644
--- a/src/mesa/drivers/glide/fxsetup.c
+++ b/src/mesa/drivers/glide/fxsetup.c
@@ -395,11 +395,11 @@ static void fxSetupSingleTMU_NoLock(fxMesaContext fxMesa, struct gl_texture_obje
static void fxSelectSingleTMUSrc_NoLock(fxMesaContext fxMesa, GLint tmu,
FxBool LODblend)
{
- if (MESA_VERBOSE&VERBOSE_DRIVER) {
- fprintf(stderr,"fxmesa: fxSelectSingleTMUSrc(%d,%d)\n",tmu,LODblend);
- }
+ if (MESA_VERBOSE&VERBOSE_DRIVER) {
+ fprintf(stderr,"fxmesa: fxSelectSingleTMUSrc(%d,%d)\n",tmu,LODblend);
+ }
- if(LODblend) {
+ if (LODblend) {
FX_grTexCombine_NoLock(GR_TMU0,
GR_COMBINE_FUNCTION_BLEND,
GR_COMBINE_FACTOR_ONE_MINUS_LOD_FRACTION,
@@ -412,32 +412,36 @@ static void fxSelectSingleTMUSrc_NoLock(fxMesaContext fxMesa, GLint tmu,
GR_COMBINE_FUNCTION_LOCAL,GR_COMBINE_FACTOR_NONE,
FXFALSE,FXFALSE);
fxMesa->tmuSrc=FX_TMU_SPLIT;
- } else {
+ }
+ else {
if (tmu!=FX_TMU1) {
FX_grTexCombine_NoLock(GR_TMU0,
GR_COMBINE_FUNCTION_LOCAL,GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_LOCAL,GR_COMBINE_FACTOR_NONE,
FXFALSE,FXFALSE);
- FX_grTexCombine_NoLock(GR_TMU1,
- GR_COMBINE_FUNCTION_ZERO, GR_COMBINE_FACTOR_NONE,
- GR_COMBINE_FUNCTION_ZERO, GR_COMBINE_FACTOR_NONE,
- FXFALSE,FXFALSE);
+ if (fxMesa->haveTwoTMUs) {
+ FX_grTexCombine_NoLock(GR_TMU1,
+ GR_COMBINE_FUNCTION_ZERO, GR_COMBINE_FACTOR_NONE,
+ GR_COMBINE_FUNCTION_ZERO, GR_COMBINE_FACTOR_NONE,
+ FXFALSE,FXFALSE);
+ }
fxMesa->tmuSrc=FX_TMU0;
- } else {
+ }
+ else {
FX_grTexCombine_NoLock(GR_TMU1,
GR_COMBINE_FUNCTION_LOCAL,GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_LOCAL,GR_COMBINE_FACTOR_NONE,
FXFALSE,FXFALSE);
-
+
/* GR_COMBINE_FUNCTION_SCALE_OTHER doesn't work ?!? */
-
+
FX_grTexCombine_NoLock(GR_TMU0,
GR_COMBINE_FUNCTION_BLEND,
GR_COMBINE_FACTOR_ONE,
GR_COMBINE_FUNCTION_BLEND,
GR_COMBINE_FACTOR_ONE,
FXFALSE,FXFALSE);
-
+
fxMesa->tmuSrc=FX_TMU1;
}
}