Mesa (master): mesa: use _mesa_get_current_tex_unit() helper in BindTexture ()

Brian Paul brianp at kemper.freedesktop.org
Thu Mar 17 03:13:50 UTC 2011


Module: Mesa
Branch: master
Commit: cbadedb511cfcebaf15029891221211219584fb3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cbadedb511cfcebaf15029891221211219584fb3

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Mar 16 21:13:31 2011 -0600

mesa: use _mesa_get_current_tex_unit() helper in BindTexture()

---

 src/mesa/main/texobj.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index c06bbb6..c1e3e4d 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -39,6 +39,7 @@
 #include "macros.h"
 #include "teximage.h"
 #include "texobj.h"
+#include "texstate.h"
 #include "mtypes.h"
 #include "program/prog_instruction.h"
 
@@ -1013,8 +1014,7 @@ void GLAPIENTRY
 _mesa_BindTexture( GLenum target, GLuint texName )
 {
    GET_CURRENT_CONTEXT(ctx);
-   const GLuint unit = ctx->Texture.CurrentUnit;
-   struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
+   struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
    struct gl_texture_object *newTexObj = NULL;
    GLint targetIndex;
    ASSERT_OUTSIDE_BEGIN_END(ctx);




More information about the mesa-commit mailing list