Skip to content

vulkan,gallium: Unify blend enums

Alyssa Rosenzweig requested to merge alyssa/mesa:vk/blend into main

Vulkan drivers that use nir_lower_blend need to translate Vulkan enums to the pipe/compiler versions used in nir_lower_blend. We don't need to duplicate that boilerplate in every VK driver that uses nir_lower_blend, move panvk's versions to common code so we can use them in agxv. I suspect powervr wants this too.

It might be useful to also share the logic to translate vk_color_blend_state to nir_lower_blend_options wholesale, but panvk wouldn't use it and agxv is downstream so it wouldn't have any in-tree users. So I'll keep that part vendored (for now). For now, let's share the easy win of the enum translation.


@kusma I suspect panvk2 could share the full version (not just the enums) but eh


In fact, we can go further and convert panfrost to use the PIPE enums internally rather than the weirdo compiler ones, and then delete the compiler ones. This is a significant clean up.

Edited by Alyssa Rosenzweig

Merge request reports