diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-07-01 21:24:43 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-07-01 21:41:23 +0100 |
commit | 5c8a108d2c99f542372efb1734c96ddd2af6bc76 (patch) | |
tree | 58dd9099e56f4c107ec28c2b4d9cadad9e2c9900 | |
parent | 121511d3bd63da5eca28edf971aae3d062aed46e (diff) |
sna/gen2: Recompute blend pipeline for component-alpha pass
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/gen2_render.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c index f1275e37..3f0b9025 100644 --- a/src/sna/gen2_render.c +++ b/src/sna/gen2_render.c @@ -325,6 +325,7 @@ gen2_emit_texture(struct sna *sna, static void gen2_get_blend_factors(const struct sna_composite_op *op, + int blend, uint32_t *c_out, uint32_t *a_out) { @@ -348,7 +349,7 @@ gen2_get_blend_factors(const struct sna_composite_op *op, /* Get the source picture's channels into TBx_ARG1 */ - if ((op->has_component_alpha && gen2_blend_op[op->op].src_alpha) || + if ((op->has_component_alpha && gen2_blend_op[blend].src_alpha) || op->dst.format == PICT_a8) { /* Producing source alpha value, so the first set of channels * is src.A instead of src.X. We also do this if the destination @@ -626,7 +627,7 @@ static void gen2_emit_composite_state(struct sna *sna, gen2_disable_logic_op(sna); - gen2_get_blend_factors(op, &cblend, &ablend); + gen2_get_blend_factors(op, op->op, &cblend, &ablend); OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_2 | LOAD_TEXTURE_BLEND_STAGE(0) | 1); OUT_BATCH(cblend); @@ -839,7 +840,7 @@ static void gen2_magic_ca_pass(struct sna *sna, gen2_get_blend_cntl(PictOpAdd, TRUE, op->dst.format) | S8_ENABLE_COLOR_BUFFER_WRITE); - gen2_get_blend_factors(op, &cblend, &ablend); + gen2_get_blend_factors(op, PictOpAdd, &cblend, &ablend); OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_2 | LOAD_TEXTURE_BLEND_STAGE(0) | 1); OUT_BATCH(cblend); |