vulkan
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_NVX_multiview_per_view_attributes

Description

Name

VK_NVX_multiview_per_view_attributes - device extension

VK_NVX_multiview_per_view_attributes

Name String
VK_NVX_multiview_per_view_attributes
Extension Type
Device extension
Registered Extension Number
98
Revision
1
Ratification Status
Not ratified
Extension and Version Dependencies
VK_KHR_multiview or Vulkan Version 1.1
API Interactions
  • Interacts with VK_VERSION_1_3
  • Interacts with VK_KHR_dynamic_rendering
SPIR-V Dependencies
Contact

Other Extension Metadata

Last Modified Date
2017-01-13
IP Status
No known IP claims.
Interactions and External Dependencies
Contributors
  • Jeff Bolz, NVIDIA
  • Daniel Koch, NVIDIA

Description

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 pre-rasterization shader 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 pre-rasterization shader 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. gl_PositionPerViewNV) must also write the non-per-view output (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 the VK_NV_viewport_array2 extension is not also supported and enabled, the per-view viewport mask must not be used.

New Structures

If Vulkan Version 1.3 or VK_KHR_dynamic_rendering is supported:

New Enum Constants

If Vulkan Version 1.3 or VK_KHR_dynamic_rendering is supported:

New Built-In Variables

New SPIR-V Capabilities

Examples

#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

See Also

No cross-references are available

Document Notes

For more information, see the Vulkan Specification.

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

Synopsis

Documentation

data PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX Source #

VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX - Structure describing multiview limits that can be supported by an implementation

Description

If the PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX structure is included in the pNext chain of the PhysicalDeviceProperties2 structure passed to getPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

Valid Usage (Implicit)

See Also

VK_NVX_multiview_per_view_attributes, Bool32, StructureType

Constructors

PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX 

Fields

  • perViewPositionAllComponents :: Bool

    perViewPositionAllComponents is TRUE if the implementation supports per-view position values that differ in components other than the X component.

Instances

Instances details
Eq PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_NVX_multiview_per_view_attributes

Storable PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_NVX_multiview_per_view_attributes

Show PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_NVX_multiview_per_view_attributes

FromCStruct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_NVX_multiview_per_view_attributes

ToCStruct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_NVX_multiview_per_view_attributes

Zero PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_NVX_multiview_per_view_attributes

data MultiviewPerViewAttributesInfoNVX Source #

VkMultiviewPerViewAttributesInfoNVX - Structure specifying the multiview per-attribute properties

Description

When dynamic render pass instances are being used, instead of specifying SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX or SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX in the subpass description flags, the per-attribute properties of the render pass instance must be specified by the MultiviewPerViewAttributesInfoNVX structure Include the MultiviewPerViewAttributesInfoNVX structure in the pNext chain of GraphicsPipelineCreateInfo when creating a graphics pipeline for dynamic rendering, RenderingInfo when starting a dynamic render pass instance, and CommandBufferInheritanceInfo when specifying the dynamic render pass instance parameters for secondary command buffers.

Valid Usage (Implicit)

See Also

VK_KHR_dynamic_rendering, VK_NVX_multiview_per_view_attributes, VK_VERSION_1_3, Bool32, StructureType

Constructors

MultiviewPerViewAttributesInfoNVX 

Fields

  • perViewAttributes :: Bool

    perViewAttributes specifies that shaders compiled for this pipeline write the attributes for all views in a single invocation of each vertex processing stage. All pipelines executed within a render pass instance that includes this bit must write per-view attributes to the *PerViewNV[] shader outputs, in addition to the non-per-view (e.g. Position) outputs.

  • perViewAttributesPositionXOnly :: Bool

    perViewAttributesPositionXOnly specifies that shaders compiled for this pipeline use per-view positions which only differ in value in the x component. Per-view viewport mask can also be used.

Instances

Instances details
Eq MultiviewPerViewAttributesInfoNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_NVX_multiview_per_view_attributes

Storable MultiviewPerViewAttributesInfoNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_NVX_multiview_per_view_attributes

Show MultiviewPerViewAttributesInfoNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_NVX_multiview_per_view_attributes

FromCStruct MultiviewPerViewAttributesInfoNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_NVX_multiview_per_view_attributes

ToCStruct MultiviewPerViewAttributesInfoNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_NVX_multiview_per_view_attributes

Zero MultiviewPerViewAttributesInfoNVX Source # 
Instance details

Defined in Vulkan.Extensions.VK_NVX_multiview_per_view_attributes

type NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME = "VK_NVX_multiview_per_view_attributes" Source #