summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2017-08-25 00:03:46 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2017-08-25 00:18:33 -0400
commitf3bde890cde869d8ba4280186a4de6dd677b387a (patch)
tree32cea78eb2ec68f83c9bdf1771b3b8e4ba0d589c /src/gallium/drivers
parentf40908f2d1455d87ed0479f9778b7978f8a32caa (diff)
a2xx: set constant blend color
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_emit.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c
index 50eee63636..44f9b55f1f 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c
@@ -309,6 +309,15 @@ fd2_emit_state(struct fd_context *ctx, const enum fd_dirty_3d_state dirty)
OUT_RING(ring, blend->rb_colormask);
}
+ if (dirty & FD_DIRTY_BLEND_COLOR) {
+ OUT_PKT3(ring, CP_SET_CONSTANT, 5);
+ OUT_RING(ring, CP_REG(REG_A2XX_RB_BLEND_RED));
+ OUT_RING(ring, float_to_ubyte(ctx->blend_color.color[0]));
+ OUT_RING(ring, float_to_ubyte(ctx->blend_color.color[1]));
+ OUT_RING(ring, float_to_ubyte(ctx->blend_color.color[2]));
+ OUT_RING(ring, float_to_ubyte(ctx->blend_color.color[3]));
+ }
+
if (dirty & (FD_DIRTY_TEX | FD_DIRTY_PROG))
emit_textures(ring, ctx);
}