panfrost: Leverage Bifrost's 2*src blend factor
authorAlyssa Rosenzweig <alyssa@collabora.com>
Fri, 30 Jul 2021 23:28:37 +0000 (19:28 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 11 Aug 2021 18:15:52 +0000 (18:15 +0000)
commit0228ccf8579cd999eaa185df6945a349c01c6aa1
treedc8dcc9f1750d34a5cbb6998f36661655142fcb4
parent95e306dc84c4964bb5ef84ff4099ae20a7ac53f1
panfrost: Leverage Bifrost's 2*src blend factor

Bifrost adds a value for the C factor equaling 2*src. This does not
correspond directly to API blend modes so it is not too useful in
general. However, it's required for src*dest + dest*src blending to be
done in hardware instead of a blend shader. GFXbench uses that blend
mode, so it must be important ;-)

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12152>
src/gallium/drivers/panfrost/pan_cmdstream.c
src/panfrost/lib/pan_blend.c
src/panfrost/lib/pan_blend.h
src/panfrost/lib/tests/test-blend.c
src/panfrost/vulkan/panvk_pipeline.c