summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_span.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-04-14 02:20:18 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-04-14 02:20:18 +0000
commitee4e75bd6f768b7210436feeb32b4545ed62e025 (patch)
tree2684654e69d43aa244fc6082717523da202aa43e /src/mesa/swrast/s_span.c
parent1d886a81add08536f18d2453ae38fcac79f0b806 (diff)
downloadexternal_mesa3d-ee4e75bd6f768b7210436feeb32b4545ed62e025.zip
external_mesa3d-ee4e75bd6f768b7210436feeb32b4545ed62e025.tar.gz
external_mesa3d-ee4e75bd6f768b7210436feeb32b4545ed62e025.tar.bz2
Replace ctx->Const.MaxTextureUnits w/ ctx->Const.MaxTexture[Coord/Image]Units
in various places. Note that ctx->Texture.CurrentUnit needs to be tested against Coord/Image limits when referenced, not just in glActiveTexture().
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r--src/mesa/swrast/s_span.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 1145772..35735a4 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -127,7 +127,7 @@ void
_swrast_span_default_texcoords( GLcontext *ctx, struct sw_span *span )
{
GLuint i;
- for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
+ for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
const GLfloat *tc = ctx->Current.RasterTexCoords[i];
if (ctx->FragmentProgram._Active || ctx->ATIFragmentShader._Enabled) {
COPY_4V(span->tex[i], tc);
@@ -401,6 +401,7 @@ interpolate_texcoords(GLcontext *ctx, struct sw_span *span)
/* multitexture */
GLuint u;
span->arrayMask |= SPAN_TEXTURE;
+ /* XXX CoordUnits vs. ImageUnits */
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
if (ctx->Texture._EnabledCoordUnits & (1 << u)) {
const struct gl_texture_object *obj =ctx->Texture.Unit[u]._Current;