diff options
author | Brian Paul <[email protected]> | 2009-08-13 09:55:34 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-08-13 12:50:56 -0600 |
commit | 6aa7a03d856f4cfdbed493c976387b2164a0c922 (patch) | |
tree | 0f3f03b94f78a94c069bb86ef1685be69b50772a /src/mesa/main/texparam.c | |
parent | 73b150c816c46a88e3e5d97f9b73ab0095f2bc60 (diff) |
mesa: use _mesa_get_current_tex_unit() in more places
Diffstat (limited to 'src/mesa/main/texparam.c')
-rw-r--r-- | src/mesa/main/texparam.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index d27c59381c5..d9ba6007a0b 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -38,6 +38,7 @@ #include "main/texcompress.h" #include "main/texparam.h" #include "main/teximage.h" +#include "main/texstate.h" #include "shader/prog_instruction.h" @@ -88,7 +89,7 @@ get_texobj(GLcontext *ctx, GLenum target) return NULL; } - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; + texUnit = _mesa_get_current_tex_unit(ctx); switch (target) { case GL_TEXTURE_1D: @@ -773,7 +774,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, return; } - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; + texUnit = _mesa_get_current_tex_unit(ctx); /* this will catch bad target values */ dimensions = tex_image_dimensions(ctx, target); /* 1, 2 or 3 */ @@ -1002,7 +1003,7 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) return; } - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; + texUnit = _mesa_get_current_tex_unit(ctx); obj = _mesa_select_tex_object(ctx, texUnit, target); if (!obj) { @@ -1169,7 +1170,7 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) return; } - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; + texUnit = _mesa_get_current_tex_unit(ctx); obj = _mesa_select_tex_object(ctx, texUnit, target); if (!obj) { |