i915: i915_context::vertex_fog is always I915_FOG_NONE, so kill it
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 16 Apr 2011 02:25:59 +0000 (19:25 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 22 Apr 2011 00:33:38 +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_context.h
src/mesa/drivers/dri/i915/i915_fragprog.c
src/mesa/drivers/dri/i915/i915_state.c

index 601620275f46d0d19ad0ccd8ba7bcb098a3aa5d3..9a09f0adc0acae9fc5066f2659cda68d196114f7 100644 (file)
@@ -254,16 +254,11 @@ struct i915_hw_state
    GLuint emitted;              /* I915_UPLOAD_* */
 };
 
-#define I915_FOG_PIXEL  2
-#define I915_FOG_VERTEX 1
-#define I915_FOG_NONE   0
-
 struct i915_context
 {
    struct intel_context intel;
 
    GLuint last_ReallyEnabled;
-   GLuint vertex_fog;
    GLuint lodbias_ss2[MAX_TEXTURE_UNITS];
 
 
index bfc2f9694bdef91f41bb8df70a7ab94c4587d6bf..b67ebb9a1ec2879b4d88b1ed477b68b78638838c 100644 (file)
@@ -1362,7 +1362,7 @@ i915ValidateFragmentProgram(struct i915_context *i915)
        EMIT_ATTR(_TNL_ATTRIB_COLOR1, EMIT_4UB_4F_BGRA, S4_VFMT_SPEC_FOG, 4);
    }
 
-   if ((inputsRead & FRAG_BIT_FOGC) || i915->vertex_fog != I915_FOG_NONE) {
+   if ((inputsRead & FRAG_BIT_FOGC)) {
       EMIT_ATTR(_TNL_ATTRIB_FOG, EMIT_1F, S4_VFMT_FOG_PARAM, 4);
    }
 
index df100314be919dec9bb74b887cffac424884d884..d027426e2ab9356c54025d61bfef2977129d0a1f 100644 (file)
@@ -733,8 +733,6 @@ i915_update_fog(struct gl_context * ctx)
 
    assert(ctx->FragmentProgram._Current);
 
-   i915->vertex_fog = I915_FOG_NONE;
-
    I915_ACTIVESTATE(i915, I915_UPLOAD_FOG, 0);
    dw = i915->state.Ctx[I915_CTXREG_LIS5] & ~S5_FOG_ENABLE;