summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-12-20 12:04:05 -0500
committerRob Clark <[email protected]>2014-12-20 12:08:37 -0500
commitaa6415b4852557ed91b4f31065a79b2a6c987c53 (patch)
treedd733590c9ebe8706aa415c159b988240c6f5c02
parent10d81a03b393d524deb7f0f436e609ca5691c9f2 (diff)
freedreno/a4xx: blend-color
Signed-off-by: Rob Clark <[email protected]>
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_emit.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
index 7f9b7257074..037f4550587 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
@@ -511,6 +511,19 @@ fd4_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring,
A4XX_RB_FS_OUTPUT_SAMPLE_MASK(0xffff));
}
+ if (dirty & FD_DIRTY_BLEND_COLOR) {
+ struct pipe_blend_color *bcolor = &ctx->blend_color;
+ OUT_PKT0(ring, REG_A4XX_RB_BLEND_RED, 4);
+ OUT_RING(ring, A4XX_RB_BLEND_RED_UINT(bcolor->color[0] * 255.0) |
+ A4XX_RB_BLEND_RED_FLOAT(bcolor->color[0]));
+ OUT_RING(ring, A4XX_RB_BLEND_GREEN_UINT(bcolor->color[1] * 255.0) |
+ A4XX_RB_BLEND_GREEN_FLOAT(bcolor->color[1]));
+ OUT_RING(ring, A4XX_RB_BLEND_BLUE_UINT(bcolor->color[2] * 255.0) |
+ A4XX_RB_BLEND_BLUE_FLOAT(bcolor->color[2]));
+ OUT_RING(ring, A4XX_RB_BLEND_ALPHA_UINT(bcolor->color[3] * 255.0) |
+ A4XX_RB_BLEND_ALPHA_FLOAT(bcolor->color[3]));
+ }
+
if (dirty & FD_DIRTY_VERTTEX) {
if (vp->has_samp)
emit_textures(ctx, ring, SB_VERT_TEX, &ctx->verttex);