dri/nouveau: Combine the dummy texture more deterministically on nv0x.
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 1 Mar 2010 00:56:38 +0000 (01:56 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 1 Mar 2010 01:07:01 +0000 (02:07 +0100)
src/mesa/drivers/dri/nouveau/nv04_state_raster.c

index b52922ea111170fadb99b36c11af52f592a03791..89c6753694c752bec0177e06ba37151124865cc9 100644 (file)
@@ -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)