Merge branch 'lp-offset-twoside'
[mesa.git] / src / mesa / drivers / dri / i965 / gen6_cc.c
index f7acad6912950aa9099db4899fd05e08db335f9a..800a25552141bb76aae204f02b383d056a08a55e 100644 (file)
@@ -49,7 +49,7 @@ static void
 blend_state_populate_key(struct brw_context *brw,
                         struct gen6_blend_state_key *key)
 {
-   GLcontext *ctx = &brw->intel.ctx;
+   struct gl_context *ctx = &brw->intel.ctx;
 
    memset(key, 0, sizeof(*key));
 
@@ -181,7 +181,7 @@ static void
 color_calc_state_populate_key(struct brw_context *brw,
                              struct gen6_color_calc_state_key *key)
 {
-   GLcontext *ctx = &brw->intel.ctx;
+   struct gl_context *ctx = &brw->intel.ctx;
 
    memset(key, 0, sizeof(*key));
 
@@ -254,7 +254,7 @@ prepare_color_calc_state(struct brw_context *brw)
 
 const struct brw_tracked_state gen6_color_calc_state = {
    .dirty = {
-      .mesa = _NEW_COLOR,
+      .mesa = _NEW_COLOR | _NEW_STENCIL,
       .brw = 0,
       .cache = 0,
    },
@@ -267,12 +267,10 @@ static void upload_cc_state_pointers(struct brw_context *brw)
 
    BEGIN_BATCH(4);
    OUT_BATCH(CMD_3D_CC_STATE_POINTERS << 16 | (4 - 2));
-   OUT_RELOC(brw->cc.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
    OUT_RELOC(brw->cc.blend_state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
    OUT_RELOC(brw->cc.depth_stencil_state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
+   OUT_RELOC(brw->cc.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
    ADVANCE_BATCH();
-
-   intel_batchbuffer_emit_mi_flush(intel->batch);
 }