i915: gl_fragment_program::FogOption is always GL_NONE so don't check it
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 16 Apr 2011 01:46:57 +0000 (18:46 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 22 Apr 2011 00:33:26 +0000 (17:33 -0700)
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
src/mesa/drivers/dri/i915/i915_fragprog.c
src/mesa/drivers/dri/i915/i915_state.c

index 7286e2b73d8ec137f3eb401353875ce01a799c4b..bfc2f9694bdef91f41bb8df70a7ab94c4587d6bf 100644 (file)
@@ -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);
index 3b1af4c455e2f90a3125621ecff31eb99e98edc9..5c7c0c32d6a97e40bc4c52724a5d6fe572a00390 100644 (file)
@@ -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 {