aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r200/r200_texstate.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-04-23 16:37:03 -0700
committerEric Anholt <[email protected]>2014-04-30 14:33:20 -0700
commit741f5d58e649cbc35c0d8661616f4e718b4718f0 (patch)
treeda34a714c58d31e8ea4f54795d157d058a323c6c /src/mesa/drivers/dri/r200/r200_texstate.c
parent2f8749af20d4bcfc976e64d4bcaef87728c54b5c (diff)
radeon: Drop the remaining driver usage of _ReallyEnabled.
This is kind of ugly, but I think it's worth it to finish off the last consumers of _ReallyEnabled. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_texstate.c')
-rw-r--r--src/mesa/drivers/dri/r200/r200_texstate.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c
index 9ec12078a47..5f740968e64 100644
--- a/src/mesa/drivers/dri/r200/r200_texstate.c
+++ b/src/mesa/drivers/dri/r200/r200_texstate.c
@@ -935,8 +935,8 @@ static GLboolean r200UpdateAllTexEnv( struct gl_context *ctx )
/* don't enable texture sampling for units if the result is not used */
for (i = 0; i < R200_MAX_TEXTURE_UNITS; i++) {
- if (ctx->Texture.Unit[i]._ReallyEnabled && !texregfree[i])
- rmesa->state.texture.unit[i].unitneeded = ctx->Texture.Unit[i]._ReallyEnabled;
+ if (ctx->Texture.Unit[i]._Current && !texregfree[i])
+ rmesa->state.texture.unit[i].unitneeded = 1 << _mesa_tex_target_to_index(ctx, ctx->Texture.Unit[i]._Current->Target);
else rmesa->state.texture.unit[i].unitneeded = 0;
}
@@ -1554,7 +1554,10 @@ void r200UpdateTextureState( struct gl_context *ctx )
if (ctx->ATIFragmentShader._Enabled) {
GLuint i;
for (i = 0; i < R200_MAX_TEXTURE_UNITS; i++) {
- rmesa->state.texture.unit[i].unitneeded = ctx->Texture.Unit[i]._ReallyEnabled;
+ if (ctx->Texture.Unit[i]._Current)
+ rmesa->state.texture.unit[i].unitneeded = 1 << _mesa_tex_target_to_index(ctx, ctx->Texture.Unit[i]._Current->Target);
+ else
+ rmesa->state.texture.unit[i].unitneeded = 0;
}
ok = GL_TRUE;
}