nir/lower_blend: Use util enums
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 11 Jul 2023 11:51:03 +0000 (07:51 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 13 Jul 2023 21:03:32 +0000 (21:03 +0000)
commita2d56c4c738fc531dc6aa59746e87e97f0044d24
treeda97dc682c929f114cfbf3472e1243eb4724a7ba
parenteb1112ae7a6e1724c26059072aee916ea7304c25
nir/lower_blend: Use util enums

This avoids the silly compiler versions. Some bits are slightly more
complicated, because they have to account for inverted enum values (rather than
a separate invert bit), but this is a LOT friendlier to drivers using the pass
and it makes the pass itself more readable.

The conversion functions in panfrost/panvk will go away momentarily.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24076>
src/compiler/nir/nir_lower_blend.c
src/compiler/nir/nir_lower_blend.h
src/gallium/drivers/asahi/agx_state.c
src/panfrost/lib/pan_blend.c
src/panfrost/vulkan/panvk_vX_shader.c