All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.vulkan.NVXMultiviewPerViewAttributes Maven / Gradle / Ivy

Go to download

A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.vulkan;

/**
 * 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 {@code SPV_NVX_multiview_per_view_attributes} and {@code 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. {@code gl_PositionPerViewNV}) must also write the non-per-view output ({@code gl_Position}), and the values written must be such that {@code 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 {@link NVViewportArray2 VK_NV_viewport_array2} is not also supported and enabled, the per-view viewport mask must not be used.

* *
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;
 * }
* *
VK_NVX_multiview_per_view_attributes
* *
*
Name String
*
{@code VK_NVX_multiview_per_view_attributes}
*
Extension Type
*
Device extension
*
Registered Extension Number
*
98
*
Revision
*
1
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
  • Requires {@link KHRMultiview VK_KHR_multiview}
  • *
*
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
  • *
*
*/ public final class NVXMultiviewPerViewAttributes { /** The extension specification version. */ public static final int VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION = 1; /** The extension name. */ public static final String VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME = "VK_NVX_multiview_per_view_attributes"; /** Extends {@code VkStructureType}. */ public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000; /** * Extends {@code VkSubpassDescriptionFlagBits}. * *
Enum values:
* *
    *
  • {@link #VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX}
  • *
  • {@link #VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX}
  • *
*/ public static final int VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x1, VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x2; private NVXMultiviewPerViewAttributes() {} }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy