summaryrefslogtreecommitdiff
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-03-13 10:28:26 -0600
committerBrian <brian@yutani.localnet.net>2007-03-13 10:28:26 -0600
commit7265e6928e873312d53eba4c24fcd3002e806831 (patch)
tree2a51033b1f546b1aebcd7006c0b58e045a032d01 /src/mesa/main/texstate.c
parentb3a22d0ed61afa9df4d3a02962884d49bc5760a4 (diff)
properly compute ctx->Texture._EnabledCoordUnits
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 7be3a44d59..bed2c1220a 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 6.5.3
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -41,8 +41,6 @@
#include "texenvprogram.h"
#include "mtypes.h"
#include "math/m_xform.h"
-/*#include "shaderobjects.h"*/
-
#define ENUM_TO_FLOAT(X) ((GLfloat)(GLint)(X))
@@ -3076,16 +3074,14 @@ update_texture_state( GLcontext *ctx )
ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(unit);
}
- /* XXX maybe move this below as an else-clause */
- ctx->Texture._EnabledCoordUnits = ctx->Texture._EnabledUnits;
-
- /* Fragment programs may need texture coordinates but not the
- * corresponding texture images.
- */
+ /* Determine which texture coordinate sets are actually needed */
if (fprog) {
- const GLuint coordMask = (1 << MAX_TEXTURE_UNITS) - 1;
+ const GLuint coordMask = (1 << MAX_TEXTURE_COORD_UNITS) - 1;
ctx->Texture._EnabledCoordUnits
- |= (fprog->Base.InputsRead >> FRAG_ATTRIB_TEX0) & coordMask;
+ = (fprog->Base.InputsRead >> FRAG_ATTRIB_TEX0) & coordMask;
+ }
+ else {
+ ctx->Texture._EnabledCoordUnits = ctx->Texture._EnabledUnits;
}
}