diff options
author | Brian Paul <brianp@vmware.com> | 2009-01-02 16:32:26 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-01-02 16:32:26 -0700 |
commit | 0815ebccfc0a12d8f3e831928f1c4210b7f75ad8 (patch) | |
tree | 1e7db7e1d44e741215e5b4b11d33df91fe5b39a0 /src/mesa/main/texstate.c | |
parent | eb9bbc5265562cb6f93688fc027ea76f91601e37 (diff) | |
parent | 1fad6ccb756ae33ca3115f59c99ca8abbeb0321e (diff) |
Merge commit 'origin/master' into gallium-0.2
Conflicts:
src/mesa/main/ffvertex_prog.c
src/mesa/main/texenvprogram.c
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r-- | src/mesa/main/texstate.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index f019377041..29955d76cb 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -81,7 +81,7 @@ _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst ) dst->Texture.SharedPalette = src->Texture.SharedPalette; /* per-unit state */ - for (i = 0; i < src->Const.MaxTextureUnits; i++) { + for (i = 0; i < src->Const.MaxTextureImageUnits; i++) { dst->Texture.Unit[i].Enabled = src->Texture.Unit[i].Enabled; dst->Texture.Unit[i].EnvMode = src->Texture.Unit[i].EnvMode; COPY_4V(dst->Texture.Unit[i].EnvColor, src->Texture.Unit[i].EnvColor); @@ -307,8 +307,7 @@ _mesa_ActiveTextureARB(GLenum texture) _mesa_debug(ctx, "glActiveTexture %s\n", _mesa_lookup_enum_by_nr(texture)); - /* XXX error-check against max(coordunits, imageunits) */ - if (texUnit >= ctx->Const.MaxTextureUnits) { + if (texUnit >= ctx->Const.MaxTextureImageUnits) { _mesa_error(ctx, GL_INVALID_ENUM, "glActiveTexture(texture)"); return; } @@ -369,7 +368,7 @@ update_texture_matrices( GLcontext *ctx ) ctx->Texture._TexMatEnabled = 0; - for (i=0; i < ctx->Const.MaxTextureUnits; i++) { + for (i=0; i < ctx->Const.MaxTextureCoordUnits; i++) { if (_math_matrix_is_dirty(ctx->TextureMatrixStack[i].Top)) { _math_matrix_analyse( ctx->TextureMatrixStack[i].Top ); @@ -491,7 +490,7 @@ update_texture_state( GLcontext *ctx ) /* * Update texture unit state. */ - for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { + for (unit = 0; unit < ctx->Const.MaxTextureImageUnits; unit++) { struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; GLbitfield enableBits; @@ -621,7 +620,7 @@ update_texture_state( GLcontext *ctx ) } /* Setup texgen for those texture coordinate sets that are in use */ - for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { + for (unit = 0; unit < ctx->Const.MaxTextureCoordUnits; unit++) { struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; if (!(ctx->Texture._EnabledCoordUnits & (1 << unit))) |