Cleanup of derived state calculation prior to seperating software T&L
[mesa.git] / src / mesa / swrast_setup / ss_vb.c
index 5e0f4dc84b3b4dcebdf98d42452bc0404caf4723..15e6049cb513926e4815df8ccd4ac95b8ec9ddcb 100644 (file)
@@ -165,16 +165,16 @@ _swsetup_choose_rastersetup_func(GLcontext *ctx)
          if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ||
              ctx->Fog.ColorSumEnabled)
             funcindex |= SPEC;
-
-         if (ctx->Point._Attenuated)
-            funcindex |= EYE;
-
-        if (ctx->Fog.Enabled)
-           funcindex |= FOG;
       }
       else {
          funcindex = INDEX;
       }
+
+      if (ctx->Point._Attenuated)
+        funcindex |= EYE;
+
+      if (ctx->Fog.Enabled)
+        funcindex |= FOG;
    }
    else {
       /* feedback or section */