i915: Remove most of the code under gen >= 4 checks.
[mesa.git] / src / mesa / drivers / dri / i965 / gen6_sampler_state.c
index 969780ac1dfd964075f8fb96ef77622a2cc4da7b..a9a9df5f8a33c9f5a39394590054ac729370c9ef 100644 (file)
@@ -41,21 +41,17 @@ upload_sampler_state_pointers(struct brw_context *brw)
             GS_SAMPLER_STATE_CHANGE |
             PS_SAMPLER_STATE_CHANGE |
             (4 - 2));
-   OUT_BATCH(0); /* VS */
+   OUT_BATCH(brw->sampler.offset); /* VS */
    OUT_BATCH(0); /* GS */
-   if (brw->wm.sampler_count)
-      OUT_RELOC(intel->batch.bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
-               brw->wm.sampler_offset);
-   else
-      OUT_BATCH(0);
-
+   OUT_BATCH(brw->sampler.offset);
    ADVANCE_BATCH();
 }
 
 const struct brw_tracked_state gen6_sampler_state = {
    .dirty = {
       .mesa = 0,
-      .brw = BRW_NEW_BATCH,
+      .brw = (BRW_NEW_BATCH |
+             BRW_NEW_STATE_BASE_ADDRESS),
       .cache = CACHE_NEW_SAMPLER
    },
    .emit = upload_sampler_state_pointers,