panvk: Pass through alpha_zero_nop/one_store flags

When constructing the Internal Blend Descriptor for fixed-function
blending, set the alpha_zero_nop/one_store flags based on the given
equation.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13508>
This commit is contained in:
Alyssa Rosenzweig 2021-10-24 19:15:26 -04:00 committed by Marge Bot
parent 77928e45eb
commit 3b146fb466
1 changed files with 8 additions and 2 deletions

View File

@ -634,11 +634,17 @@ panvk_per_arch(emit_blend)(const struct panvk_device *dev,
constant <<= 16 - chan_size;
cfg.constant = constant;
if (pan_blend_is_opaque(blend->rts[rt].equation))
if (pan_blend_is_opaque(blend->rts[rt].equation)) {
cfg.internal.mode = MALI_BLEND_MODE_OPAQUE;
else
} else {
cfg.internal.mode = MALI_BLEND_MODE_FIXED_FUNCTION;
cfg.internal.fixed_function.alpha_zero_nop =
pan_blend_alpha_zero_nop(blend->rts[rt].equation);
cfg.internal.fixed_function.alpha_one_store =
pan_blend_alpha_one_store(blend->rts[rt].equation);
}
/* If we want the conversion to work properly,
* num_comps must be set to 4
*/