From: Eric Anholt Date: Thu, 24 Apr 2014 00:21:30 +0000 (-0700) Subject: gallium: Drop use of _ReallyEnabled. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8061f90a64e81eeaf1508d29a0b2524961ef1ab8;p=mesa.git gallium: Drop use of _ReallyEnabled. Reviewed-by: Matt Turner Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex.c index b0a44fd901c..f997e6b0007 100644 --- a/src/mesa/state_tracker/st_cb_drawtex.c +++ b/src/mesa/state_tracker/st_cb_drawtex.c @@ -123,7 +123,8 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, /* determine how many enabled sets of texcoords */ numTexCoords = 0; for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { - if (ctx->Texture.Unit[i]._ReallyEnabled & TEXTURE_2D_BIT) { + if (ctx->Texture.Unit[i]._Current && + ctx->Texture.Unit[i]._Current->Target == GL_TEXTURE_2D) { numTexCoords++; } } @@ -192,7 +193,8 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, /* texcoords */ for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { - if (ctx->Texture.Unit[i]._ReallyEnabled & TEXTURE_2D_BIT) { + if (ctx->Texture.Unit[i]._Current && + ctx->Texture.Unit[i]._Current->Target == GL_TEXTURE_2D) { struct gl_texture_object *obj = ctx->Texture.Unit[i]._Current; struct gl_texture_image *img = obj->Image[0][obj->BaseLevel]; const GLfloat wt = (GLfloat) img->Width;