• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (c) 2017-2020 NVIDIA Corporation
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5include::{generated}/meta/{refprefix}VK_NV_viewport_array2.txt[]
6
7=== Other Extension Metadata
8
9*Last Modified Date*::
10    2017-02-15
11*Interactions and External Dependencies*::
12  - This extension requires
13    {spirv}/NV/SPV_NV_viewport_array2.html[`SPV_NV_viewport_array2`]
14  - This extension provides API support for
15    https://www.khronos.org/registry/OpenGL/extensions/NV/NV_viewport_array2.txt[`GL_NV_viewport_array2`]
16  - This extension requires the pname:geometryShader and pname:multiViewport
17    features.
18  - This extension interacts with the pname:tessellationShader feature.
19*Contributors*::
20  - Piers Daniell, NVIDIA
21  - Jeff Bolz, NVIDIA
22
23=== Description
24
25This extension adds support for the following SPIR-V extension in Vulkan:
26
27  * `SPV_NV_viewport_array2`
28
29which allows a single primitive to be broadcast to multiple viewports and/or
30multiple layers.
31A new shader built-in output code:ViewportMaskNV is provided, which allows a
32single primitive to be output to multiple viewports simultaneously.
33Also, a new SPIR-V decoration is added to control whether the effective
34viewport index is added into the variable decorated with the code:Layer
35built-in decoration.
36These capabilities allow a single primitive to be output to multiple layers
37simultaneously.
38
39This extension allows variables decorated with the code:Layer and
40code:ViewportIndex built-ins to be exported from vertex or tessellation
41shaders, using the code:ShaderViewportIndexLayerNV capability.
42
43This extension adds a new code:ViewportMaskNV built-in decoration that is
44available for output variables in vertex, tessellation evaluation, and
45geometry shaders, and a new code:ViewportRelativeNV decoration that can be
46added on variables decorated with code:Layer when using the
47code:ShaderViewportMaskNV capability.
48
49When using GLSL source-based shading languages, the code:gl_ViewportMask[]
50built-in output variable and code:viewport_relative layout qualifier from
51`GL_NV_viewport_array2` map to the code:ViewportMaskNV and
52code:ViewportRelativeNV decorations, respectively.
53Behaviour is described in the `GL_NV_viewport_array2` extension
54specificiation.
55
56ifdef::VK_EXT_shader_viewport_index_layer[]
57[NOTE]
58.Note
59====
60The code:ShaderViewportIndexLayerNV capability is equivalent to the
61code:ShaderViewportIndexLayerEXT capability added by
62`apiext:VK_EXT_shader_viewport_index_layer`.
63====
64endif::VK_EXT_shader_viewport_index_layer[]
65
66include::{generated}/interfaces/VK_NV_viewport_array2.txt[]
67
68=== New or Modified Built-In Variables
69
70  * (modified) <<interfaces-builtin-variables-layer,code:Layer>>
71  * (modified)
72    <<interfaces-builtin-variables-viewportindex,code:ViewportIndex>>
73  * <<interfaces-builtin-variables-viewportmask,code:ViewportMaskNV>>
74
75=== New Variable Decoration
76
77  * <<interfaces-builtin-variables-layer,code:ViewportRelativeNV in
78    code:Layer>>
79
80=== New SPIR-V Capabilities
81
82  * <<spirvenv-capabilities-table-ShaderViewportIndexLayerNV,code:ShaderViewportIndexLayerNV>>
83  * <<spirvenv-capabilities-table-ShaderViewportMaskNV,code:ShaderViewportMaskNV>>
84
85=== Version History
86
87  * Revision 1, 2017-02-15 (Daniel Koch)
88    - Internal revisions
89