gallium: Add helper to convert PIPE blending to shader_enum style
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 6 May 2019 02:03:48 +0000 (02:03 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Fri, 10 May 2019 15:49:16 +0000 (15:49 +0000)
commit6b0472b18199aecba30052ad7d2936de943d0cfb
tree9c768327ececc6ec6163859d3936577a6d24acf3
parentf41be53a1706181be85a8ba41681e28b4780f6e1
gallium: Add helper to convert PIPE blending to shader_enum style

Complementing the new API-agnostic shader_enum blending style, we add
helpers to translate between the two forms. Ideally, we could just use
PIPE blending directly, but that makes Vulkan support challenging.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/auxiliary/util/u_blend.h