diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-20 15:53:32 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-20 15:53:32 +0000 |
commit | 2f9ac4e8a17e9d60bbb55c46929c37e92181d804 (patch) | |
tree | af00251ae5e2735582065e088987ccd20d221fe8 /src/sna/gen5_render.c | |
parent | 650c9d5ce80afc1d4c8d9f77f6679f085fa4dc9d (diff) |
sna/gen3+: And restore non-CA compositing state after the CA pass
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen5_render.c')
-rw-r--r-- | src/sna/gen5_render.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index 695ec331..5995d1d9 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -199,13 +199,13 @@ gen5_choose_composite_kernel(int op, bool has_mask, bool is_ca, bool is_affine) return base + !is_affine; } -static void gen5_magic_ca_pass(struct sna *sna, +static bool gen5_magic_ca_pass(struct sna *sna, const struct sna_composite_op *op) { struct gen5_render_state *state = &sna->render_state.gen5; if (!op->need_magic_ca_pass) - return; + return false; assert(sna->render.vertex_index > sna->render.vertex_start); @@ -230,6 +230,7 @@ static void gen5_magic_ca_pass(struct sna *sna, OUT_BATCH(0); /* index buffer offset, ignored */ state->last_primitive = sna->kgem.nbatch; + return true; } static uint32_t gen5_get_blend(int op, @@ -601,7 +602,9 @@ static int gen5_get_rectangles__flush(struct sna *sna, if (sna->render.vertex_offset) { gen4_vertex_flush(sna); - gen5_magic_ca_pass(sna, op); + if (gen5_magic_ca_pass(sna, op)) + gen5_emit_pipelined_pointers(sna, op, op->op, + op->u.gen5.wm_kernel); } return gen4_vertex_finish(sna); |