Mesa (master): i915: i915_context::vertex_fog is always I915_FOG_NONE, so kill it

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


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Apr 15 19:25:59 2011 -0700

i915: i915_context::vertex_fog is always I915_FOG_NONE, so kill 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_context.h  |    5 -----
 src/mesa/drivers/dri/i915/i915_fragprog.c |    2 +-
 src/mesa/drivers/dri/i915/i915_state.c    |    2 --
 3 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/i915_context.h b/src/mesa/drivers/dri/i915/i915_context.h
index 6016202..9a09f0a 100644
--- a/src/mesa/drivers/dri/i915/i915_context.h
+++ b/src/mesa/drivers/dri/i915/i915_context.h
@@ -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];
 
 
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c
index bfc2f96..b67ebb9 100644
--- a/src/mesa/drivers/dri/i915/i915_fragprog.c
+++ b/src/mesa/drivers/dri/i915/i915_fragprog.c
@@ -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);
    }
 
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index df10031..d027426 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -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;
 



More information about the mesa-commit mailing list