diff options
author | Marek Olšák <[email protected]> | 2017-11-15 22:02:51 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-02-13 01:00:45 +0100 |
commit | 07c10cc59c164ddd0109e061dac8edf47437d8ca (patch) | |
tree | ad38e5e0408a4fe07fb41a77b0bacef2e19a7100 /src/mesa/main/texstate.h | |
parent | 79aca14f5f37de32140fb710970133c72886a0f2 (diff) |
mesa: separate legacy stuff from gl_texture_unit into gl_fixedfunc_texture_unit
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/texstate.h')
-rw-r--r-- | src/mesa/main/texstate.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/main/texstate.h b/src/mesa/main/texstate.h index 4f515e425a8..cf3f7e5a216 100644 --- a/src/mesa/main/texstate.h +++ b/src/mesa/main/texstate.h @@ -54,6 +54,21 @@ _mesa_get_current_tex_unit(struct gl_context *ctx) return _mesa_get_tex_unit(ctx, ctx->Texture.CurrentUnit); } + +/** + * Return pointer to current fixed-func texture unit. + * This the texture unit set by glActiveTexture(), not glClientActiveTexture(). + * \return NULL if the current unit is not a fixed-func texture unit + */ +static inline struct gl_fixedfunc_texture_unit * +_mesa_get_current_fixedfunc_tex_unit(struct gl_context *ctx) +{ + unsigned unit = ctx->Texture.CurrentUnit; + + return &ctx->Texture.FixedFuncUnit[unit]; +} + + static inline GLuint _mesa_max_tex_unit(struct gl_context *ctx) { |