i915: Remove most of the code under gen >= 4 checks.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_wm_state.c
index ea2dea92a7010acfe81c86b41fdff7d2e66d0747..4bac56ab74736cb072737bfddcbb27938f6f0c58 100644 (file)
@@ -150,7 +150,7 @@ brw_upload_wm_unit(struct brw_context *brw)
 
    /* BRW_NEW_FRAGMENT_PROGRAM */
    wm->wm5.program_uses_depth = (fp->Base.InputsRead &
-                                (1 << FRAG_ATTRIB_WPOS)) != 0;
+                                (1 << VARYING_SLOT_POS)) != 0;
    wm->wm5.program_computes_depth = (fp->Base.OutputsWritten &
                                     BITFIELD64_BIT(FRAG_RESULT_DEPTH)) != 0;
    /* _NEW_BUFFERS
@@ -203,7 +203,7 @@ brw_upload_wm_unit(struct brw_context *brw)
    /* _NEW_LINE */
    wm->wm5.line_stipple = ctx->Line.StippleFlag;
 
-   /* _NEW_DEPTH */
+   /* BRW_NEW_STATS_WM */
    if (unlikely(INTEL_DEBUG & DEBUG_STATS) || intel->stats_wm)
       wm->wm4.stats_enable = 1;
 
@@ -237,13 +237,13 @@ const struct brw_tracked_state brw_wm_unit = {
               _NEW_POLYGONSTIPPLE | 
               _NEW_LINE | 
               _NEW_COLOR |
-              _NEW_DEPTH |
               _NEW_BUFFERS),
 
       .brw = (BRW_NEW_BATCH |
              BRW_NEW_PROGRAM_CACHE |
              BRW_NEW_FRAGMENT_PROGRAM |
-             BRW_NEW_CURBE_OFFSETS),
+             BRW_NEW_CURBE_OFFSETS |
+              BRW_NEW_STATS_WM),
 
       .cache = (CACHE_NEW_WM_PROG |
                CACHE_NEW_SAMPLER)