Dependencies
This extension is written against the SPIR-V Specification, Version 1.1 Revision 4.
This extension requires SPIR-V 1.0.
Overview
This extension adds a new capability to support the Vulkan VK_NVX_multiview_per_view_attributes extension in SPIR-V.
The new PerViewAttributesNV capability adds two builtin variables, PositionPerViewNV and ViewportMaskPerViewNV, which can be exported from Vertex, Tessellation, or Geometry shaders. PositionPerViewNV can be imported to Tessellation or Geometry shaders.
The PositionPerViewNV builtin decoration corresponds to the gl_PositionPerViewNV[] array in GLSL and is used to specify per-view positions.
The ViewportMaskPerViewNV builtin decoration corresponds to the gl_ViewportMaskPerViewNV[] array in GLSL and is used to specify the per-view viewport masks.
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_NVX_multiview_per_view_attributes"
New Builtins
Two new builtins are added as outputs for the Vertex, Tessellation and Geometry Execution Models under the PerViewAttributesNV capability:
PositionPerViewNV ViewportMaskPerViewNV
PositionPerViewNV can also be used as an input for the Tesselation and Geometry Execution Models.
Modifications to the SPIR-V Specification, Version 1.1
- (Modify Section 3.21, BuiltIn)
-
(add two new rows to the BuiltIn table)
BuiltIn Enabling Capabilities 5261
PositionPerViewNV
Output vertex position for each view in Vertex, Tessellation, or Geometry Execution Model, and input position for each view in Tessellation and Geometry Execution Models. See Vulkan API specification for more detail.PerViewAttributesNV
5262
ViewportMaskPerViewNV
Output viewport mask for each view in Vertex, Tessellation, or Geometry Execution Model. See Vulkan API specification for more detail.PerViewAttributesNV
- (Modify Section 3.31, Capability, add a new row to the Capability table)
-
Capability Implicitly Declares Enabled by Extension 5260
PerViewAttributesNV
MultiView
SPV_NVX_multiview_per_view_attributes