aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_raster.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
index b52922ea111..89c6753694c 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
@@ -300,7 +300,10 @@ nv04_emit_blend(GLcontext *ctx, int emit)
blend |= NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_FLAT;
/* Texture environment. */
- blend |= get_texenv_mode(ctx->Texture.Unit[0].EnvMode);
+ if (ctx->Texture._EnabledUnits)
+ blend |= get_texenv_mode(ctx->Texture.Unit[0].EnvMode);
+ else
+ blend |= get_texenv_mode(GL_MODULATE);
/* Fog. */
if (ctx->Fog.Enabled)