nir: Add alpha_to_coverage lowering pass

Graphics / Mesa 3D Graphics Library / Mesa - Sagar Ghuge [intel.com] - 21 October 2019 18:27 EDT

Importing this pass from fs_visitor::emit_alpha_to_coverage_workaround() in intel/compiler.

v2 (Caio Marcelo de Oliveira Filho):- Track store output and sample mask instruction- Nest math insturction for more readability- Bail out early if no gl_SampleMask

v3: (Caio Marcelo de Oliveira Filho):- Do math instructions after instruction block- Restructure code- Move pass under src/intel/compiler

v4: (Caio Marcelo de Oliveira Filho):- Organize dither mask calculation

7ecfbd4f6d4 nir: Add alpha_to_coverage lowering pass
src/intel/compiler/brw_nir.h | 1 +
.../compiler/brw_nir_lower_alpha_to_coverage.c | 169 +++++++++++++++++++++
src/intel/compiler/meson.build | 1 +
3 files changed, 171 insertions(+)

Upstream: cgit.freedesktop.org


  • Share