summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state_init.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tcl.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texstate.c13
4 files changed, 10 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 4a19db4bf24..414946bc39a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -1935,7 +1935,7 @@ static void update_texturematrix( struct gl_context *ctx )
rmesa->TexMatColSwap = 0;
for (unit = 0 ; unit < ctx->Const.MaxTextureUnits; unit++) {
- if (ctx->Texture.Unit[unit]._ReallyEnabled) {
+ if (ctx->Texture.Unit[unit]._Current) {
GLboolean needMatrix = GL_FALSE;
if (ctx->TextureMatrixStack[unit].Top->type != MATRIX_IDENTITY) {
needMatrix = GL_TRUE;
@@ -2016,7 +2016,7 @@ static GLboolean r100ValidateBuffers(struct gl_context *ctx)
for (i = 0; i < ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits; ++i) {
radeonTexObj *t;
- if (!ctx->Texture.Unit[i]._ReallyEnabled)
+ if (!ctx->Texture.Unit[i]._Current)
continue;
t = rmesa->state.texture.unit[i].texobj;
diff --git a/src/mesa/drivers/dri/radeon/radeon_state_init.c b/src/mesa/drivers/dri/radeon/radeon_state_init.c
index f44dff09eae..c14407ffd58 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state_init.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state_init.c
@@ -211,9 +211,9 @@ CHECK( cube1_mm, (ctx->Texture.Unit[1]._ReallyEnabled & TEXTURE_CUBE_BIT), 2 + 4
CHECK( cube2_mm, (ctx->Texture.Unit[2]._ReallyEnabled & TEXTURE_CUBE_BIT), 2 + 4*5 - CUBE_STATE_SIZE )
CHECK( fog_add4, ctx->Fog.Enabled, 4 )
TCL_CHECK( tcl_add4, GL_TRUE, 4 )
-TCL_CHECK( tcl_tex0_add4, ctx->Texture.Unit[0]._ReallyEnabled, 4 )
-TCL_CHECK( tcl_tex1_add4, ctx->Texture.Unit[1]._ReallyEnabled, 4 )
-TCL_CHECK( tcl_tex2_add4, ctx->Texture.Unit[2]._ReallyEnabled, 4 )
+TCL_CHECK( tcl_tex0_add4, ctx->Texture.Unit[0]._Current, 4 )
+TCL_CHECK( tcl_tex1_add4, ctx->Texture.Unit[1]._Current, 4 )
+TCL_CHECK( tcl_tex2_add4, ctx->Texture.Unit[2]._Current, 4 )
TCL_CHECK( tcl_lighting, ctx->Light.Enabled, 0 )
TCL_CHECK( tcl_lighting_add4, ctx->Light.Enabled, 4 )
TCL_CHECK( tcl_eyespace_or_lighting_add4, ctx->_NeedEyeCoords || ctx->Light.Enabled, 4 )
diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c b/src/mesa/drivers/dri/radeon/radeon_tcl.c
index 21d54fb9acc..271d5f91346 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tcl.c
@@ -386,7 +386,7 @@ static GLboolean radeon_run_tcl_render( struct gl_context *ctx,
}
for (i = 0 ; i < ctx->Const.MaxTextureUnits; i++) {
- if (ctx->Texture.Unit[i]._ReallyEnabled) {
+ if (ctx->Texture.Unit[i]._Current) {
/* TODO: probably should not emit texture coords when texgen is enabled */
if (rmesa->TexGenNeedNormals[i]) {
inputs |= VERT_BIT_NORMAL;
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index dac8aedddec..4600d34ce82 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -257,12 +257,6 @@ static GLboolean radeonUpdateTextureEnv( struct gl_context *ctx, int unit )
| RADEON_SCALE_1X | RADEON_CLAMP_TX;
- /* texUnit->_Current can be NULL if and only if the texture unit is
- * not actually enabled.
- */
- assert( (texUnit->_ReallyEnabled == 0)
- || (texUnit->_Current != NULL) );
-
if ( RADEON_DEBUG & RADEON_TEXTURE ) {
fprintf( stderr, "%s( %p, %d )\n", __FUNCTION__, (void *)ctx, unit );
}
@@ -279,7 +273,7 @@ static GLboolean radeonUpdateTextureEnv( struct gl_context *ctx, int unit )
rmesa->state.texture.unit[unit].format = 0;
rmesa->state.texture.unit[unit].envMode = 0;
- if ( !texUnit->_ReallyEnabled ) {
+ if ( !texUnit->_Current ) {
color_combine = color_combine0;
alpha_combine = alpha_combine0;
}
@@ -1082,13 +1076,14 @@ static GLboolean radeonUpdateTextureUnit( struct gl_context *ctx, int unit )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
- if (ctx->Texture.Unit[unit]._ReallyEnabled & TEXTURE_3D_BIT) {
+ if (ctx->Texture.Unit[unit]._Current &&
+ ctx->Texture.Unit[unit]._Current->Target == GL_TEXTURE_3D) {
disable_tex_obj_state(rmesa, unit);
rmesa->state.texture.unit[unit].texobj = NULL;
return GL_FALSE;
}
- if (!ctx->Texture.Unit[unit]._ReallyEnabled) {
+ if (!ctx->Texture.Unit[unit]._Current) {
/* disable the unit */
disable_tex_obj_state(rmesa, unit);
rmesa->state.texture.unit[unit].texobj = NULL;