mesa: Branch 'master'

Nan hai Zou znh at kemper.freedesktop.org
Fri Feb 2 03:29:34 UTC 2007


 src/mesa/drivers/dri/i915/i915_state.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

New commits:
diff-tree 2dfb3a217f730d6783fb2ac8b73248dc682f923c (from af1d1e08e40c8c70dfa81e39724be11da94f938d)
Author: Zou Nan hai <nanhai.zou at intel.com>
Date:   Fri Feb 2 09:35:17 2007 +0800

      Fix fd.o #9686, when fall into vertex fog,
      fog factors are precomputed in t_vb_fog.c compute_fog_blend_factors,
      which is incompatible with appended fragment fog code.
      That will make GoogleEarth display abnormally.
      always use pixel fog.

diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index 3cec6a2..fd11e10 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -611,10 +611,12 @@ void 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 i915Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *param)



More information about the mesa-commit mailing list