nir: Add alpha_to_coverage lowering pass
authorSagar Ghuge <sagar.ghuge@intel.com>
Fri, 27 Sep 2019 23:23:46 +0000 (16:23 -0700)
committerSagar Ghuge <sagar.ghuge@intel.com>
Mon, 21 Oct 2019 18:27:29 +0000 (11:27 -0700)
commit7ecfbd4f6d407460ae47c598f07627b2b8468811
tree5620e955377763e0cd5fcfa54ffa51b58c4ca3cf
parent0e4bd261b1535b5c1d38607545a54101cb1f3d01
nir: Add alpha_to_coverage lowering pass

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

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/intel/compiler/brw_nir.h
src/intel/compiler/brw_nir_lower_alpha_to_coverage.c [new file with mode: 0644]
src/intel/compiler/meson.build