push commit 2dfb3a217f730d6783fb2ac8b73248dc682f923c to i915tex
authorZou Nan hai <nanhai.zou@intel.com>
Fri, 2 Feb 2007 06:37:24 +0000 (14:37 +0800)
committerZou Nan hai <nanhai.zou@intel.com>
Fri, 2 Feb 2007 06:37:24 +0000 (14:37 +0800)
src/mesa/drivers/dri/i915tex/i915_state.c

index 7c742a7bd946dc18ce134416e31c1818554e0e33..78ae4bdb5fcd2dcadea80b19dfe8055ea7f70e5d 100644 (file)
@@ -645,10 +645,12 @@ i915_update_fog(GLcontext * ctx)
          i915->state.Ctx[I915_CTXREG_LIS5] &= ~S5_FOG_ENABLE;
    }
 
-   if (enabled) {
-      _tnl_allow_vertex_fog(ctx, (i915->vertex_fog == I915_FOG_VERTEX));
-      _tnl_allow_pixel_fog(ctx, (i915->vertex_fog != I915_FOG_VERTEX));
-   }
+    /* always enbale pixel fog
+    * vertex fog use precaculted fog coord will conflict with appended
+    * fog program
+    */
+    _tnl_allow_vertex_fog( ctx, 0 );
+    _tnl_allow_pixel_fog( ctx, 1 );
 }
 
 static void