summaryrefslogtreecommitdiff
path: root/src/sna/gen6_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-10-31 13:35:59 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-10-31 13:37:51 +0000
commit82e6d41c2f4f343bd1854d3d8ee4b624b5d68971 (patch)
tree99d82a3deafc6606049f29a28f733d8f1c334193 /src/sna/gen6_render.c
parent5cdc2bbc9c66d4c8c6fdb1b552c32177d070bf7b (diff)
sna/gen6: Tweak flush around CC state changes
In order to fix some font corruption, it appears that we need an extra flush in the Sandybridge pipeline when we change the CC stage and the render cache is dirty. We previously triggered a full pipeline stall for this case. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen6_render.c')
-rw-r--r--src/sna/gen6_render.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index f271cf81..9797ef94 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -866,21 +866,22 @@ gen6_emit_state(struct sna *sna,
const struct sna_composite_op *op,
uint16_t wm_binding_table)
{
- bool need_stall = wm_binding_table & 1;
+ bool need_flush, need_stall;
assert(op->dst.bo->exec);
- if (gen6_emit_cc(sna, GEN6_BLEND(op->u.gen6.flags)))
- need_stall = false;
+ need_flush =
+ gen6_emit_cc(sna, GEN6_BLEND(op->u.gen6.flags)) &&
+ wm_binding_table & 1;
gen6_emit_sampler(sna, GEN6_SAMPLER(op->u.gen6.flags));
gen6_emit_sf(sna, GEN6_VERTEX(op->u.gen6.flags) >> 2);
gen6_emit_wm(sna, GEN6_KERNEL(op->u.gen6.flags), GEN6_VERTEX(op->u.gen6.flags) >> 2);
gen6_emit_vertex_elements(sna, op);
- need_stall |= gen6_emit_binding_table(sna, wm_binding_table & ~1);
+ need_stall = gen6_emit_binding_table(sna, wm_binding_table & ~1);
if (gen6_emit_drawing_rectangle(sna, op))
need_stall = false;
- if (kgem_bo_is_dirty(op->src.bo) || kgem_bo_is_dirty(op->mask.bo)) {
+ if (need_flush || kgem_bo_is_dirty(op->src.bo) || kgem_bo_is_dirty(op->mask.bo)) {
gen6_emit_flush(sna);
kgem_clear_dirty(&sna->kgem);
assert(op->dst.bo->exec);