aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.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/enable.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/enable.c')
-rw-r--r--src/mesa/main/enable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 418fc75c724..8c3a9a789a9 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -247,7 +247,7 @@ static GLboolean
enable_texture(struct gl_context *ctx, GLboolean state, GLbitfield texBit)
{
struct gl_fixedfunc_texture_unit *texUnit =
- _mesa_get_current_fixedfunc_tex_unit(ctx);
+ _mesa_get_fixedfunc_tex_unit(ctx, ctx->Texture.CurrentUnit);
if (!texUnit)
return GL_FALSE;
@@ -1401,7 +1401,7 @@ static GLboolean
is_texture_enabled(struct gl_context *ctx, GLbitfield bit)
{
const struct gl_fixedfunc_texture_unit *const texUnit =
- _mesa_get_current_fixedfunc_tex_unit(ctx);
+ _mesa_get_fixedfunc_tex_unit(ctx, ctx->Texture.CurrentUnit);
if (!texUnit)
return GL_FALSE;