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