diff options
author | Dave Airlie <airlied@linux.ie> | 2009-07-11 03:01:52 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2009-07-11 03:17:12 +1000 |
commit | 85957cb512e74c8ddeb5ba2e06df091943ab8400 (patch) | |
tree | 138d46327c7bd23382d2bbb2d3801aa905d242d4 /src/mesa/drivers/dri/radeon/radeon_texstate.c | |
parent | a6a11e1dc019ad54e0c4c9d1de46ca6ca48528c3 (diff) |
radeon: set texture in state properly.
make sure to turn off when no texture is used in hw
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_texstate.c')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texstate.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c index d33eb9988f..c29105d7b8 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texstate.c +++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c @@ -1143,12 +1143,14 @@ static GLboolean radeonUpdateTextureUnit( GLcontext *ctx, int unit ) r100ContextPtr rmesa = R100_CONTEXT(ctx); if (ctx->Texture.Unit[unit]._ReallyEnabled & TEXTURE_3D_BIT) { + rmesa->state.texture.unit[unit].texobj = NULL; return GL_FALSE; } if (!ctx->Texture.Unit[unit]._ReallyEnabled) { /* disable the unit */ disable_tex_obj_state(rmesa, unit); + rmesa->state.texture.unit[unit].texobj = NULL; return GL_TRUE; } @@ -1156,8 +1158,8 @@ static GLboolean radeonUpdateTextureUnit( GLcontext *ctx, int unit ) _mesa_warning(ctx, "failed to validate texture for unit %d.\n", unit); - rmesa->state.texture.unit[unit].texobj = NULL; - return GL_FALSE; + rmesa->state.texture.unit[unit].texobj = NULL; + return GL_FALSE; } rmesa->state.texture.unit[unit].texobj = radeon_tex_obj(ctx->Texture.Unit[unit]._Current); return GL_TRUE; |