This fixes fogging for fragment programs with fog a fog option set.
From 533e782dee9ed569eb35456b583a5740c3082afe Mon Sep 17 00:00:00 2001
From: Henri Verbeet <[EMAIL PROTECTED]>
Date: Sun, 5 Oct 2008 14:39:57 +0200
Subject: swrast: Fog coords should also be read when the fog option is active 
in a fragment program.

---
 src/mesa/swrast/s_context.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index 62857dd..48fc363 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -578,12 +578,12 @@ _swrast_update_active_attribs(GLcontext *ctx)
          attribsMask |= FRAG_BIT_COL1;
       }
 
-      if (swrast->_FogEnabled)
-         attribsMask |= FRAG_BIT_FOGC;
-
       attribsMask |= (ctx->Texture._EnabledUnits << FRAG_ATTRIB_TEX0);
    }
 
+   if (swrast->_FogEnabled)
+      attribsMask |= FRAG_BIT_FOGC;
+
    swrast->_ActiveAttribMask = attribsMask;
 
    /* Update _ActiveAttribs[] list */
-- 
1.5.6.4

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to