[Mesa-dev] [PATCH 0/7] Blend shaders! (NIR lowering pass)

Alyssa Rosenzweig alyssa at rosenzweig.io
Mon May 6 02:26:04 UTC 2019


This patch series implements lowering of the (GLES?) blend pipeline.
With the lowering pass introduced in the first four commits, paired with
the related blending infrastructure in the latter three, Panfrost now
passes all of:

        dEQP-GLES2.functional.fragment_ops.blend.*

To verify the passes correctness, I also tested a version forcing blend
shaders unconditionally; this also passes the entire section.

(Eric: This can be considered a "v2" of the sillier version I sent in
November, but it has been rewritten in its entirety to work independent
of Gallium. It'll probably be useful to vc4 with a little work.
Disclaimer: Vulkan driver not actually tested :) )

(Ken: I copied you on the first 4 since IIRC you worked on advanced
blending lowering.)

Alyssa Rosenzweig (7):
  compiler: Add enums for blend state
  gallium: Add helper to convert PIPE blending to shader_enum style
  nir: Add blend_const_color_rgba sysval
  nir: Add nir_lower_blend pass
  panfrost/midgard: Route new blending intrinsics
  panfrost: Wire up nir_lower_blend
  panfrost: Improve fixed-function blending

 src/compiler/Makefile.sources                 |   1 +
 src/compiler/nir/meson.build                  |   1 +
 src/compiler/nir/nir.h                        |  22 ++
 src/compiler/nir/nir_intrinsics.py            |   5 +-
 src/compiler/nir/nir_lower_blend.c            | 214 ++++++++++++++++++
 src/compiler/shader_enums.h                   |  21 ++
 src/gallium/auxiliary/util/u_blend.h          |  92 ++++++++
 .../panfrost/midgard/midgard_compile.c        | 207 +++++++++--------
 .../drivers/panfrost/pan_blend_shaders.c      |  46 ++--
 src/gallium/drivers/panfrost/pan_blending.c   |  70 +++---
 10 files changed, 529 insertions(+), 150 deletions(-)
 create mode 100644 src/compiler/nir/nir_lower_blend.c

-- 
2.20.1



More information about the mesa-dev mailing list