Vulkan-Docs/appendices/VK_NVX_multiview_per_view_attributes.txt
Jon Leech 521e98405f Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.

Github Issues:

  * Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
    `<<VK_NV_ray_tracing>>` (public issue 848).
  * Add missing valid usage statements for feature flags in
    slink:VkCommandBufferInheritanceInfo (public pull request 1017).

Internal Issues:

  * Clarify behavior of non-premultiplied destination colors for
    `<<VK_EXT_blend_operation_advanced>>` prior to the definition of
    slink:VkBlendOverlapEXT (internal issue 1766).
  * Fix the confusing phrasing "`no other queue must: be (doing something)`"
    for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
    flink:vkQueueBindSparse (internal issue 1774).
  * Add `<<VK_EXT_validation_features>>` flag to enable best practices
    checks, which will soon be available in the validation layer (internal
    issue 1779).
  * Specify allowed characters for VUID tag name components in the style
    guide (internal issue 1788).
  * Update links to SPIR-V extension specifications, and parameterize their
    markup in case the URLs change in the future (internal issue 1797).
  * Fix an off-by-one error in the valid usage statement for
    slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
  * Clean up markup indentation not matching the style guide (internal merge
    request 3314).
  * Minor script updates to allow refpage aliases, generate a dynamic TOC
    for refpages, generate Apache rewrite rules for aliases, open external
    links from refpages in a new window, and synchronize with the OpenCL
    scripts. This will shortly enable a paned navigation setup for refpages,
    similar to the OpenCL 2.2 refpages (internal merge request 3322).
  * Script updates to add tests to the checker, refactor and reformat code,
    generate better text for some valid usage statements, use more Pythonic
    idioms, and synchronize with the OpenXR scripts (internal merge request
    3239).
  * Script updates and minor fixes in spec language to not raise checker
    errors for refpage markup of pages not existing in the API, such as
    VKAPI_NO_STDINT_H. Remove corresponding suppression of some
    check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
    (internal merge request 3315).
2019-08-17 15:33:21 -07:00

113 lines
3.5 KiB
Plaintext

include::meta/VK_NVX_multiview_per_view_attributes.txt[]
*Last Modified Date*::
2017-01-13
*IP Status*::
No known IP claims.
*Interactions and External Dependencies*::
- This extension requires the
{spirv}/NV/SPV_NVX_multiview_per_view_attributes.html[`SPV_NVX_multiview_per_view_attributes`]
SPIR-V extension.
- This extension requires the `GL_NVX_multiview_per_view_attributes`
extension for GLSL source languages.
- This extension interacts with `<<VK_NV_viewport_array2>>`.
*Contributors*::
- Jeff Bolz, NVIDIA
- Daniel Koch, NVIDIA
This extension adds a new way to write shaders to be used with multiview
subpasses, where the attributes for all views are written out by a single
invocation of the vertex processing stages.
Related SPIR-V and GLSL extensions `SPV_NVX_multiview_per_view_attributes`
and `GL_NVX_multiview_per_view_attributes` introduce per-view position and
viewport mask attributes arrays, and this extension defines how those
per-view attribute arrays are interpreted by Vulkan.
Pipelines using per-view attributes may: only execute the vertex processing
stages once for all views rather than once per-view, which reduces redundant
shading work.
A subpass creation flag controls whether the subpass uses this extension.
A subpass must: either exclusively use this extension or not use it at all.
Some Vulkan implementations only support the position attribute varying
between views in the X component.
A subpass can declare via a second creation flag whether all pipelines
compiled for this subpass will obey this restriction.
Shaders that use the new per-view outputs (e.g. code:gl_PositionPerViewNV)
must: also write the non-per-view output (code:gl_Position), and the values
written must: be such that `gl_Position =
gl_PositionPerViewNV[gl_ViewIndex]` for all views in the subpass.
Implementations are free to either use the per-view outputs or the
non-per-view outputs, whichever would be more efficient.
If `<<VK_NV_viewport_array2>>` is not also supported and enabled, the
per-view viewport mask must: not be used.
=== New Object Types
None.
=== New Enum Constants
* Extending elink:VkStructureType
** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX
* Extending elink:VkSubpassDescriptionFlagBits
** ename:VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX
** ename:VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX
=== New Enums
None.
=== New Structures
* slink:VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX
=== New Functions
None.
=== New Built-In Variables
* <<interfaces-builtin-variables-positionperview,code:PositionPerViewNV>>
* <<interfaces-builtin-variables-viewportmaskperview,code:ViewportMaskPerViewNV>>
=== New SPIR-V Capabilities
* <<spirvenv-capabilities-table-perviewattributes,code:PerViewAttributesNV>>
=== Issues
None.
=== Examples
[source,c]
---------------------------------------------------
#version 450 core
#extension GL_KHX_multiview : enable
#extension GL_NVX_multiview_per_view_attributes : enable
layout(location = 0) in vec4 position;
layout(set = 0, binding = 0) uniform Block { mat4 mvpPerView[2]; } buf;
void main()
{
// Output both per-view positions and gl_Position as a function
// of gl_ViewIndex
gl_PositionPerViewNV[0] = buf.mvpPerView[0] * position;
gl_PositionPerViewNV[1] = buf.mvpPerView[1] * position;
gl_Position = buf.mvpPerView[gl_ViewIndex] * position;
}
---------------------------------------------------
=== Version History
* Revision 1, 2017-01-13 (Jeff Bolz)
- Internal revisions