diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2020-02-11 14:41:05 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-07 17:16:09 +0000 |
commit | 5dc85abc4fe0a27beb00ef31bb21b79dbdcfec8d (patch) | |
tree | 3cca58838267538448c1f52e10842e4d86d61cc0 /src/compiler/nir/nir.h | |
parent | 0bc77bcdb2c4f943ac1c946daaeda6295242d059 (diff) |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2313>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r-- | src/compiler/nir/nir.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 4d3c0d03ccf..c76d009bf8c 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -454,6 +454,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. * * This is not equal to \c ir_depth_layout_none if and only if this |