From ee4e75bd6f768b7210436feeb32b4545ed62e025 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 14 Apr 2006 02:20:18 +0000 Subject: 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(). --- src/mesa/swrast/s_span.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa/swrast/s_span.c') diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 11457723b09..35735a411f9 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; -- cgit v1.2.3