Mesa (master): i915: gl_fragment_program:: FogOption is always GL_NONE so don't check it

Ian Romanick idr at kemper.freedesktop.org
Thu Apr 21 17:34:36 PDT 2011


Module: Mesa
Branch: master
Commit: df7555e763b9a4d989788e9b1cd25e8740649e79
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=df7555e763b9a4d989788e9b1cd25e8740649e79

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Apr 15 18:46:57 2011 -0700

i915: gl_fragment_program::FogOption is always GL_NONE so don't check it

Reviewed-by: Eric Anholt <eric at anholt.net>
Acked-by: Corbin Simpson <MostAwesomeDude at gmail.com>
Acked-by: Alex Deucher <alexdeucher at gmail.com>

---

 src/mesa/drivers/dri/i915/i915_fragprog.c |    9 ---------
 src/mesa/drivers/dri/i915/i915_state.c    |    4 ++--
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c
index 7286e2b..bfc2f96 100644
--- a/src/mesa/drivers/dri/i915/i915_fragprog.c
+++ b/src/mesa/drivers/dri/i915/i915_fragprog.c
@@ -1285,15 +1285,6 @@ i915ProgramStringNotify(struct gl_context * ctx,
    if (target == GL_FRAGMENT_PROGRAM_ARB) {
       struct i915_fragment_program *p = (struct i915_fragment_program *) prog;
       p->translated = 0;
-
-      /* Hack: make sure fog is correctly enabled according to this
-       * fragment program's fog options.
-       */
-      if (p->FragProg.FogOption) {
-         /* add extra instructions to do fog, then turn off FogOption field */
-         _mesa_append_fog_code(ctx, &p->FragProg, GL_TRUE);
-         p->FragProg.FogOption = GL_NONE;
-      }
    }
 
    (void) _tnl_program_string(ctx, target, prog);
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index 3b1af4c..5c7c0c3 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -736,8 +736,8 @@ i915_update_fog(struct gl_context * ctx)
 
    if (ctx->FragmentProgram._Current) {
       /* Pull in static fog state from program */
-      mode = ctx->FragmentProgram._Current->FogOption;
-      enabled = (mode != GL_NONE);
+      mode = GL_NONE;
+      enabled = GL_FALSE;
       try_pixel_fog = 0;
    }
    else {



More information about the mesa-commit mailing list