r200: only emit unitneeded textures
authorDave Airlie <airlied@redhat.com>
Fri, 26 Jun 2009 05:04:30 +0000 (15:04 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 26 Jun 2009 05:09:11 +0000 (15:09 +1000)
src/mesa/drivers/dri/r200/r200_state_init.c

index f88ec877c5acd1c1e3b78f8cfba925ffcf519a9a..c7df4b2587e2ed2fd83acd29cbc24d99ebf04b40 100644 (file)
@@ -585,6 +585,8 @@ static void tex_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
    radeon_mipmap_level *lvl;
    int hastexture = 1;
 
+   if (!r200->state.texture.unit[i].unitneeded)
+        hastexture = 0;
    if (!t)
        hastexture = 0;
    else {