mesa: use _mesa_get_current_tex_unit() helper in BindTexture()

This commit is contained in:
Brian Paul
2011-03-16 21:13:31 -06:00
parent 552f54bf04
commit cbadedb511
+2 -2
View File
@@ -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);