diff options
author | Fredrik Höglund <[email protected]> | 2013-11-12 17:28:12 +0100 |
---|---|---|
committer | Fredrik Höglund <[email protected]> | 2014-05-02 02:53:25 +0200 |
commit | 4bd82720880bef34895f34ac8141d0d9246b2b6d (patch) | |
tree | d84a2a117882038956f8c0f404b240da90a61491 /src/mesa/main/texstate.c | |
parent | 6bf8ac846aeb8b6e53b4a3545ee5f8ce94055ae7 (diff) |
mesa: Add a _BoundTextures field in gl_texture_unit
This will be used by glBindTextures() when unbinding textures,
to avoid having to loop over all the targets.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r-- | src/mesa/main/texstate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 91b29069169..19508cf39d0 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -113,6 +113,7 @@ _mesa_copy_texture_state( const struct gl_context *src, struct gl_context *dst ) MAX2(dst->Texture.NumCurrentTexUsed, u + 1); } } + dst->Texture.Unit[u]._BoundTextures = src->Texture.Unit[u]._BoundTextures; _mesa_unlock_context_textures(dst); } } @@ -877,6 +878,8 @@ init_texture_unit( struct gl_context *ctx, GLuint unit ) _mesa_reference_texobj(&texUnit->CurrentTex[tex], ctx->Shared->DefaultTex[tex]); } + + texUnit->_BoundTextures = 0; } |