nir: Add per_view attribute to nir_variable
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 11 Feb 2020 22:41:05 +0000 (14:41 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 7 Apr 2020 17:16:09 +0000 (17:16 +0000)
commit5dc85abc4fe0a27beb00ef31bb21b79dbdcfec8d
tree3cca58838267538448c1f52e10842e4d86d61cc0
parent0bc77bcdb2c4f943ac1c946daaeda6295242d059
nir: Add per_view attribute to nir_variable

If a nir_variable is tagged with per_view, it must be an array with
size corresponding to the number of views.  For slot-tracking, it is
considered to take just the slot for a single element -- drivers will
take care of expanding this appropriately.

This will be used to implement the ability of having per-view position
in a vertex shader in Intel platforms.

Acked-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2313>
src/compiler/nir/nir.h
src/compiler/nir/nir_gather_info.c
src/compiler/nir/nir_linking_helpers.c
src/compiler/nir/nir_lower_io_arrays_to_elements.c
src/compiler/nir/nir_lower_io_to_vector.c
src/compiler/nir/nir_print.c
src/compiler/nir/nir_validate.c