// Copyright 2016-2022 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

include::{generated}/meta/{refprefix}VK_KHR_multiview.adoc[]

=== Other Extension Metadata

*Last Modified Date*::
    2016-10-28
*IP Status*::
    No known IP claims.
*Interactions and External Dependencies*::
  - Promoted to Vulkan 1.1 Core
  - This extension requires
    {spirv}/KHR/SPV_KHR_multiview.html[`SPV_KHR_multiview`]
  - This extension provides API support for
    {GLSLregistry}/ext/GL_EXT_multiview.txt[`GL_EXT_multiview`]
*Contributors*::
  - Jeff Bolz, NVIDIA

=== Description

This extension has the same goal as the OpenGL ES `GL_OVR_multiview`
extension.
Multiview is a rendering technique originally designed for VR where it is
more efficient to record a single set of commands to be executed with
slightly different behavior for each "`view`".

It includes a concise way to declare a render pass with multiple views, and
gives implementations freedom to render the views in the most efficient way
possible.
This is done with a multiview configuration specified during <<renderpass,
render pass>> creation with the slink:VkRenderPassMultiviewCreateInfo passed
into slink:VkRenderPassCreateInfo::pname:pNext.

This extension enables the use of the
{spirv}/KHR/SPV_KHR_multiview.html[`SPV_KHR_multiview`] shader extension,
which adds a new `ViewIndex` built-in type that allows shaders to control
what to do for each view.
If using GLSL there is also the
{GLSLregistry}/ext/GL_EXT_multiview.txt[`GL_EXT_multiview`] extension that
introduces a `highp int gl_ViewIndex;` built-in variable for vertex,
tessellation, geometry, and fragment shaders.

=== Promotion to Vulkan 1.1

All functionality in this extension is included in core Vulkan 1.1, with the
KHR suffix omitted.
The original type, enum and command names are still available as aliases of
the core functionality.

include::{generated}/interfaces/VK_KHR_multiview.adoc[]

=== New Built-In Variables

  * <<interfaces-builtin-variables-viewindex,code:ViewIndex>>

=== New SPIR-V Capabilities

  * <<spirvenv-capabilities-table-MultiView, code:MultiView>>

ifdef::isrefpage[]

=== Additional Resources

* https://devblogs.nvidia.com/turing-multi-view-rendering-vrworks['NVIDIA
  blog post']
* https://community.arm.com/developer/tools-software/graphics/b/blog/posts/optimizing-virtual-reality-understanding-multiview['ARM
  blog post']

endif::isrefpage[]

=== Version History

  * Revision 1, 2016-10-28 (Jeff Bolz)
  ** Internal revisions

