if (ALWAYS_INVALIDATE)
need_invalidate = true;
- need_flush = sna->render_state.gen7.emit_flush;
+ need_flush =
+ sna->render_state.gen7.emit_flush ||
+ wm_binding_table & GEN7_READS_DST(op->u.gen7.flags);
if (ALWAYS_FLUSH)
need_flush = true;
+ wm_binding_table &= ~1;
+
need_stall = sna->render_state.gen7.surface_table != wm_binding_table;
need_stall &= gen7_emit_drawing_rectangle(sna, op);
if (ALWAYS_STALL)
const struct sna_composite_op *op)
{
uint32_t *binding_table;
- uint16_t offset;
+ uint16_t offset, dirty;
gen7_get_batch(sna, op);
binding_table = gen7_composite_get_binding_table(sna, &offset);
+ dirty = kgem_bo_is_dirty(op->dst.bo);
+
binding_table[0] =
gen7_bind_bo(sna,
op->dst.bo, op->dst.width, op->dst.height,
offset = sna->render_state.gen7.surface_table;
}
- gen7_emit_state(sna, op, offset);
+ gen7_emit_state(sna, op, offset | dirty);
}
static void
int src_height[6];
int src_pitch[6];
uint32_t *binding_table;
- uint16_t offset;
+ uint16_t offset, dirty;
int n_src, n;
gen7_get_batch(sna, op);
binding_table = gen7_composite_get_binding_table(sna, &offset);
+ dirty = kgem_bo_is_dirty(op->dst.bo);
+
binding_table[0] =
gen7_bind_bo(sna,
op->dst.bo, op->dst.width, op->dst.height,
src_surf_format);
}
- gen7_emit_state(sna, op, offset);
+ gen7_emit_state(sna, op, offset | dirty);
}
static bool
const struct sna_composite_op *op)
{
uint32_t *binding_table;
- uint16_t offset;
+ uint16_t offset, dirty;
gen7_get_batch(sna, op);
binding_table = gen7_composite_get_binding_table(sna, &offset);
+ dirty = kgem_bo_is_dirty(op->dst.bo);
+
binding_table[0] =
gen7_bind_bo(sna,
op->dst.bo, op->dst.width, op->dst.height,
}
assert(!GEN7_READS_DST(op->u.gen7.flags));
- gen7_emit_state(sna, op, offset);
+ gen7_emit_state(sna, op, offset | dirty);
}
static inline bool
static void
gen7_emit_fill_state(struct sna *sna, const struct sna_composite_op *op)
{
+ uint16_t dirty;
uint32_t *binding_table;
uint16_t offset;
binding_table = gen7_composite_get_binding_table(sna, &offset);
+ dirty = kgem_bo_is_dirty(op->dst.bo);
+
binding_table[0] =
gen7_bind_bo(sna,
op->dst.bo, op->dst.width, op->dst.height,
offset = sna->render_state.gen7.surface_table;
}
- gen7_emit_state(sna, op, offset);
+ gen7_emit_state(sna, op, offset | dirty);
}
static bool