diff options
author | Ilia Mirkin <[email protected]> | 2015-11-20 13:27:49 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-11-20 19:46:21 -0500 |
commit | 3b77826cc19d7a6a7e5cc6af6552d0ba89ec2922 (patch) | |
tree | 442a5b1cdc68c024c7313b8bff672c28c7814e13 /src/gallium/drivers/freedreno/a4xx/fd4_blend.c | |
parent | e1319dcdd6c63ce289a75cd06ac20355d48f01d7 (diff) |
freedreno/a4xx: logic op handling
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a4xx/fd4_blend.c')
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_blend.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_blend.c b/src/gallium/drivers/freedreno/a4xx/fd4_blend.c index e9a9ac19b79..98a96c131c5 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_blend.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_blend.c @@ -60,12 +60,12 @@ fd4_blend_state_create(struct pipe_context *pctx, const struct pipe_blend_state *cso) { struct fd4_blend_stateobj *so; -// enum a3xx_rop_code rop = ROP_COPY; + enum a3xx_rop_code rop = ROP_COPY; bool reads_dest = false; unsigned i, mrt_blend = 0; if (cso->logicop_enable) { -// rop = cso->logicop_func; /* maps 1:1 */ + rop = cso->logicop_func; /* maps 1:1 */ switch (cso->logicop_func) { case PIPE_LOGICOP_NOR: @@ -116,7 +116,8 @@ fd4_blend_state_create(struct pipe_context *pctx, so->rb_mrt[i].control = - 0xc00 | /* XXX ROP_CODE ?? */ + A4XX_RB_MRT_CONTROL_ROP_CODE(rop) | + COND(cso->logicop_enable, A4XX_RB_MRT_CONTROL_ROP_ENABLE) | A4XX_RB_MRT_CONTROL_COMPONENT_ENABLE(rt->colormask); if (rt->blend_enable) { @@ -127,8 +128,10 @@ fd4_blend_state_create(struct pipe_context *pctx, mrt_blend |= (1 << i); } - if (reads_dest) + if (reads_dest) { so->rb_mrt[i].control |= A4XX_RB_MRT_CONTROL_READ_DEST_ENABLE; + mrt_blend |= (1 << i); + } if (cso->dither) so->rb_mrt[i].buf_info |= A4XX_RB_MRT_BUF_INFO_DITHER_MODE(DITHER_ALWAYS); |