nir: Add blend lowering pass
This pass was originally developed for Panfrost, where it passes the relevant dEQP tests. Upstreaming so it can be extended and then shared with: * Asahi, for blending * Zink, for logic ops * Lavapipe, for advanced blending Note that using this with MRT in a fragment shader (as non-panfrost drivers will) has not yet been tested. Logic ops with integer framebuffers are probably todo. It's been enough for Panfrost, will suffice for ES2 on Asahi, and provides an upstream base for kusma's work on advanced blending, so overall the merge is a net benefit. v2: Remove bogus assert that the format layout is PLAIN. We need to render R11G11B10, which Mesa reports as layout OTHER. The code is still correct. Signed-off-by:Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> [v1] Part-of: <!10601>
- src/compiler/Makefile.sources 1 addition, 0 deletionssrc/compiler/Makefile.sources
- src/compiler/nir/meson.build 1 addition, 0 deletionssrc/compiler/nir/meson.build
- src/compiler/nir/nir_lower_blend.c 381 additions, 0 deletionssrc/compiler/nir/nir_lower_blend.c
- src/compiler/nir/nir_lower_blend.h 69 additions, 0 deletionssrc/compiler/nir/nir_lower_blend.h