[Bug 68410] [bisected ivb] Small black box corruption in firefox
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Oct 8 19:58:17 CEST 2013
https://bugs.freedesktop.org/show_bug.cgi?id=68410
--- Comment #48 from Chris Wilson <chris at chris-wilson.co.uk> ---
Different arrangement to put the flush/stall/invalidate first before changing
the pipeline:
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 4b60f53..9c52e38 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -1097,36 +1097,48 @@ gen7_emit_state(struct sna *sna,
const struct sna_composite_op *op,
uint16_t wm_binding_table)
{
+ bool need_invalidate;
+ bool need_flush;
bool need_stall;
assert(op->dst.bo->exec);
- gen7_emit_cc(sna, GEN7_BLEND(op->u.gen7.flags));
- gen7_emit_sampler(sna, GEN7_SAMPLER(op->u.gen7.flags));
- gen7_emit_sf(sna, GEN7_VERTEX(op->u.gen7.flags) >> 2);
- gen7_emit_wm(sna, GEN7_KERNEL(op->u.gen7.flags));
- gen7_emit_vertex_elements(sna, op);
+ need_invalidate = kgem_bo_is_dirty(op->src.bo) ||
kgem_bo_is_dirty(op->mask.bo);
+ if (ALWAYS_INVALIDATE)
+ need_invalidate = true;
+
+ need_flush = sna->render_state.gen7.emit_flush;
+ if (ALWAYS_FLUSH)
+ need_flush = true;
- need_stall = gen7_emit_binding_table(sna, wm_binding_table);
+ need_stall = sna->render_state.gen7.surface_table != wm_binding_table;
need_stall &= gen7_emit_drawing_rectangle(sna, op);
if (ALWAYS_STALL)
need_stall = true;
- if (ALWAYS_INVALIDATE || kgem_bo_is_dirty(op->src.bo) ||
kgem_bo_is_dirty(op->mask.bo)) {
+ if (need_invalidate) {
gen7_emit_pipe_invalidate(sna);
kgem_clear_dirty(&sna->kgem);
assert(op->dst.bo->exec);
kgem_bo_mark_dirty(op->dst.bo);
- sna->render_state.gen7.emit_flush = false;
+
+ need_flush = false;
need_stall = false;
}
- if (ALWAYS_FLUSH || (sna->render_state.gen7.emit_flush &&
GEN7_READS_DST(op->u.gen7.flags))) {
+ if (need_flush) {
gen7_emit_pipe_flush(sna, need_stall);
need_stall = false;
}
if (need_stall)
gen7_emit_pipe_stall(sna);
+ gen7_emit_cc(sna, GEN7_BLEND(op->u.gen7.flags));
+ gen7_emit_sampler(sna, GEN7_SAMPLER(op->u.gen7.flags));
+ gen7_emit_sf(sna, GEN7_VERTEX(op->u.gen7.flags) >> 2);
+ gen7_emit_wm(sna, GEN7_KERNEL(op->u.gen7.flags));
+ gen7_emit_vertex_elements(sna, op);
+ gen7_emit_binding_table(sna, wm_binding_table);
+
sna->render_state.gen7.emit_flush = GEN7_READS_DST(op->u.gen7.flags);
}
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20131008/870c84f0/attachment.html>
More information about the intel-gfx-bugs
mailing list