sna/gen2: Fix alpha replication in the copy pipeline

When copying into an a8 surface we need to replicate the result into the
green channel. It helps to tell the GPU from where to source the value
to be replicated.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-07-02 23:17:32 +01:00
parent 2b0d36c638
commit 158095ff2b
1 changed files with 1 additions and 1 deletions

View File

@ -3105,7 +3105,7 @@ gen2_emit_copy_pipeline(struct sna *sna, const struct sna_composite_op *op)
blend = TB0C_LAST_STAGE | TB0C_RESULT_SCALE_1X | TB0C_OP_ARG1 |
TB0C_OUTPUT_WRITE_CURRENT;
if (op->dst.format == PICT_a8)
blend |= TB0C_ARG1_REPLICATE_ALPHA;
blend |= TB0C_ARG1_REPLICATE_ALPHA | TB0C_ARG1_SEL_TEXEL0;
else if (PICT_FORMAT_RGB(op->src.pict_format) != 0)
blend |= TB0C_ARG1_SEL_TEXEL0;
else