mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 10:40:11 +01:00
freedreno/a4xx: alpha blend fixes
Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
a7d91c33c2
commit
036f434ac2
3 changed files with 11 additions and 1 deletions
|
|
@ -110,11 +110,13 @@ fd4_blend_state_create(struct pipe_context *pctx,
|
|||
0xc00 | /* XXX ROP_CODE ?? */
|
||||
A4XX_RB_MRT_CONTROL_COMPONENT_ENABLE(rt->colormask);
|
||||
|
||||
if (rt->blend_enable)
|
||||
if (rt->blend_enable) {
|
||||
so->rb_mrt[i].control |=
|
||||
A4XX_RB_MRT_CONTROL_READ_DEST_ENABLE |
|
||||
A4XX_RB_MRT_CONTROL_BLEND |
|
||||
A4XX_RB_MRT_CONTROL_BLEND2;
|
||||
so->rb_fs_output |= A4XX_RB_FS_OUTPUT_ENABLE_BLEND;
|
||||
}
|
||||
|
||||
if (reads_dest)
|
||||
so->rb_mrt[i].control |= A4XX_RB_MRT_CONTROL_READ_DEST_ENABLE;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ struct fd4_blend_stateobj {
|
|||
uint32_t buf_info;
|
||||
uint32_t blend_control;
|
||||
} rb_mrt[8];
|
||||
uint32_t rb_fs_output;
|
||||
};
|
||||
|
||||
static INLINE struct fd4_blend_stateobj *
|
||||
|
|
|
|||
|
|
@ -367,6 +367,9 @@ fd4_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
|||
OUT_PKT0(ring, REG_A4XX_GRAS_ALPHA_CONTROL, 1);
|
||||
OUT_RING(ring, zsa->gras_alpha_control);
|
||||
|
||||
OUT_PKT0(ring, REG_A4XX_RB_ALPHA_CONTROL, 1);
|
||||
OUT_RING(ring, zsa->rb_alpha_control);
|
||||
|
||||
OUT_PKT0(ring, REG_A4XX_RB_STENCIL_CONTROL, 2);
|
||||
OUT_RING(ring, zsa->rb_stencil_control);
|
||||
OUT_RING(ring, zsa->rb_stencil_control2);
|
||||
|
|
@ -486,6 +489,10 @@ fd4_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
|||
OUT_PKT0(ring, REG_A4XX_RB_MRT_BLEND_CONTROL(i), 1);
|
||||
OUT_RING(ring, blend->rb_mrt[i].blend_control);
|
||||
}
|
||||
|
||||
OUT_PKT0(ring, REG_A4XX_RB_FS_OUTPUT, 1);
|
||||
OUT_RING(ring, blend->rb_fs_output |
|
||||
A4XX_RB_FS_OUTPUT_SAMPLE_MASK(0xffff));
|
||||
}
|
||||
|
||||
if (dirty & FD_DIRTY_VERTTEX) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue