if (!ctx->Texture.Unit[i]._ReallyEnabled)
continue;
- t = radeon_tex_obj(ctx->Texture.Unit[i]._Current);
+ t = rmesa->state.texture.unit[i].texobj;
if (t->image_override && t->bo)
radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs, t->bo,
RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0);
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;
}
_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;