summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texenv.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-08-13 09:55:34 -0600
committerBrian Paul <[email protected]>2009-08-13 12:50:56 -0600
commit6aa7a03d856f4cfdbed493c976387b2164a0c922 (patch)
tree0f3f03b94f78a94c069bb86ef1685be69b50772a /src/mesa/main/texenv.c
parent73b150c816c46a88e3e5d97f9b73ab0095f2bc60 (diff)
mesa: use _mesa_get_current_tex_unit() in more places
Diffstat (limited to 'src/mesa/main/texenv.c')
-rw-r--r--src/mesa/main/texenv.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index 4c04a7ed375..1eab78c74ce 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -35,6 +35,7 @@
#include "main/enums.h"
#include "main/macros.h"
#include "main/texenv.h"
+#include "main/texstate.h"
#define TE_ERROR(errCode, msg, value) \
@@ -466,7 +467,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
if (target == GL_TEXTURE_ENV) {
switch (pname) {
@@ -793,7 +794,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
if (target == GL_TEXTURE_ENV) {
if (pname == GL_TEXTURE_ENV_COLOR) {
@@ -857,7 +858,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
if (target == GL_TEXTURE_ENV) {
if (pname == GL_TEXTURE_ENV_COLOR) {
@@ -936,7 +937,8 @@ _mesa_TexBumpParameterfvATI( GLenum pname, const GLfloat *param )
ASSERT_OUTSIDE_BEGIN_END(ctx);
/* should return error if extension not supported? */
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+
+ texUnit = _mesa_get_current_tex_unit(ctx);
if (pname == GL_BUMP_ROT_MATRIX_ATI) {
if (TEST_EQ_4V(param, texUnit->RotMatrix))
@@ -965,7 +967,8 @@ _mesa_GetTexBumpParameterivATI( GLenum pname, GLint *param )
ASSERT_OUTSIDE_BEGIN_END(ctx);
/* should return error if extension not supported? */
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+
+ texUnit = _mesa_get_current_tex_unit(ctx);
if (pname == GL_BUMP_ROT_MATRIX_SIZE_ATI) {
/* spec leaves open to support larger matrices.
@@ -1012,7 +1015,8 @@ _mesa_GetTexBumpParameterfvATI( GLenum pname, GLfloat *param )
ASSERT_OUTSIDE_BEGIN_END(ctx);
/* should return error if extension not supported? */
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+
+ texUnit = _mesa_get_current_tex_unit(ctx);
if (pname == GL_BUMP_ROT_MATRIX_SIZE_ATI) {
/* spec leaves open to support larger matrices.