summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_drawtex.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-04-23 17:21:30 -0700
committerEric Anholt <eric@anholt.net>2014-04-30 14:33:20 -0700
commit8061f90a64e81eeaf1508d29a0b2524961ef1ab8 (patch)
tree8ffbed89c0fdd434b2fc2e5eedf4ab1ec7b1f59b /src/mesa/state_tracker/st_cb_drawtex.c
parentcef82a64bdd90c8562325afd69fdf8b9a80ddb2f (diff)
downloadexternal_mesa3d-8061f90a64e81eeaf1508d29a0b2524961ef1ab8.zip
external_mesa3d-8061f90a64e81eeaf1508d29a0b2524961ef1ab8.tar.gz
external_mesa3d-8061f90a64e81eeaf1508d29a0b2524961ef1ab8.tar.bz2
gallium: Drop use of _ReallyEnabled.
Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_drawtex.c')
-rw-r--r--src/mesa/state_tracker/st_cb_drawtex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex.c
index b0a44fd..f997e6b 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;