mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-03 02:10:24 +01:00
freedreno/a2xx: fix SRC_ALPHA_SATURATE for alpha blend function
Fixes failures in the following deqp tests: dEQP-GLES2.functional.fragment_ops.*src_alpha_saturate* Signed-off-by: Jonathan Marek <jonathan@marek.ca> Reviewed-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
80906a12d9
commit
ac4ca24c32
1 changed files with 6 additions and 1 deletions
|
|
@ -83,8 +83,13 @@ fd2_blend_state_create(struct pipe_context *pctx,
|
|||
A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN(blend_func(rt->rgb_func)) |
|
||||
A2XX_RB_BLEND_CONTROL_COLOR_DESTBLEND(fd_blend_factor(rt->rgb_dst_factor));
|
||||
|
||||
/* hardware doesn't support SRC_ALPHA_SATURATE for alpha, but it is equivalent to ONE */
|
||||
unsigned alpha_src_factor = rt->alpha_src_factor;
|
||||
if (alpha_src_factor == PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE)
|
||||
alpha_src_factor = PIPE_BLENDFACTOR_ONE;
|
||||
|
||||
so->rb_blendcontrol_alpha =
|
||||
A2XX_RB_BLEND_CONTROL_ALPHA_SRCBLEND(fd_blend_factor(rt->alpha_src_factor)) |
|
||||
A2XX_RB_BLEND_CONTROL_ALPHA_SRCBLEND(fd_blend_factor(alpha_src_factor)) |
|
||||
A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN(blend_func(rt->alpha_func)) |
|
||||
A2XX_RB_BLEND_CONTROL_ALPHA_DESTBLEND(fd_blend_factor(rt->alpha_dst_factor));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue