aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texenv.c
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2019-04-29 19:23:36 +0200
committerMarek Olšák <[email protected]>2019-08-06 17:02:52 -0400
commit58030d2b3ded667585f4f5e7bc459008f7ba7e8f (patch)
treef3dde92d24711e041a97a2d60dc72d2ee01bed67 /src/mesa/main/texenv.c
parentb4c54894bba085966c52cb515bd72927e4ec4939 (diff)
mesa: replace _mesa_get_current_fixedfunc_tex_unit with _mesa_get_fixedfunc_tex_unit
The new function implements the same feature but doesn't depend on ctx->Texture.CurrentUnit. This change allows to use it from indexed functions. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/texenv.c')
-rw-r--r--src/mesa/main/texenv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index a69c8dd7435..95b44004c32 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -408,7 +408,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
if (target == GL_TEXTURE_ENV) {
struct gl_fixedfunc_texture_unit *texUnit =
- _mesa_get_current_fixedfunc_tex_unit(ctx);
+ _mesa_get_fixedfunc_tex_unit(ctx, ctx->Texture.CurrentUnit);
/* The GL spec says that we should report an error if the unit is greater
* than GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, but in practice, only
@@ -670,7 +670,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
if (target == GL_TEXTURE_ENV) {
struct gl_fixedfunc_texture_unit *texUnit =
- _mesa_get_current_fixedfunc_tex_unit(ctx);
+ _mesa_get_fixedfunc_tex_unit(ctx, ctx->Texture.CurrentUnit);
/* The GL spec says that we should report an error if the unit is greater
* than GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, but in practice, only
@@ -747,7 +747,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
if (target == GL_TEXTURE_ENV) {
struct gl_fixedfunc_texture_unit *texUnit =
- _mesa_get_current_fixedfunc_tex_unit(ctx);
+ _mesa_get_fixedfunc_tex_unit(ctx, ctx->Texture.CurrentUnit);
/* The GL spec says that we should report an error if the unit is greater
* than GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, but in practice, only