nir: Add nir_lower_multiview pass
authorConnor Abbott <cwabbott0@gmail.com>
Mon, 6 Jul 2020 13:25:03 +0000 (15:25 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 29 Sep 2020 10:31:59 +0000 (10:31 +0000)
commitffe946d7e82ca95a59851ea65fc725f0f1ebf85d
tree52e9c989128fa2624a253b72aba3424f5d2bc985
parentb4c07a8a87d06f2c347f204cac9fe708428e272d
nir: Add nir_lower_multiview pass

Taken mostly directly from the anv pass. A few anv-specific things that
I could leave in anv aren't included. Specifically on turnip we don't
need to set gl_Layer to 0, and we can handle the case where the FS reads
gl_ViewIndex, so that check is moved into anv.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6514>
src/compiler/Makefile.sources
src/compiler/nir/meson.build
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_multiview.c [new file with mode: 0644]