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>
This commit is contained in:
Caio Marcelo de Oliveira Filho
2020-02-11 14:41:05 -08:00
committed by Marge Bot
parent 0bc77bcdb2
commit 5dc85abc4f
7 changed files with 42 additions and 8 deletions
+6
View File
@@ -453,6 +453,12 @@ typedef struct nir_variable {
*/
unsigned how_declared:2;
/**
* Is this variable per-view? If so, we know it must be an array with
* size corresponding to the number of views.
*/
unsigned per_view:1;
/**
* \brief Layout qualifier for gl_FragDepth.
*