Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkRenderPassMultiviewCreateInfo

extends Struct<VkRenderPassMultiviewCreateInfo>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Known Direct Subclasses
org.lwjgl.vulkan.VkRenderPassMultiviewCreateInfoKHR
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Structure containing multiview information for all subpasses.
Description

When a subpass uses a non-zero view mask, multiview functionality is considered to be enabled. Multiview is all-or-nothing for a render pass - that is, either all subpasses must have a non-zero view mask (though some subpasses may have only one view) or all must be zero. Multiview causes all drawing and clear commands in the subpass to behave as if they were broadcast to each view, where a view is represented by one layer of the framebuffer attachments. All draws and clears are broadcast to each view index whose bit is set in the view mask. The view index is provided in the ViewIndex shader input variable, and color, depth/stencil, and input attachments all read/write the layer of the framebuffer corresponding to the view index.

If the view mask is zero for all subpasses, multiview is considered to be disabled and all drawing commands execute normally, without this additional broadcasting.

Some implementations may not support multiview in conjunction with mesh shaders, geometry shaders or tessellation shaders.

When multiview is enabled, the DEPENDENCY_VIEW_LOCAL_BIT bit in a dependency can be used to express a view-local dependency, meaning that each view in the destination subpass depends on a single view in the source subpass. Unlike pipeline barriers, a subpass dependency can potentially have a different view mask in the source subpass and the destination subpass. If the dependency is view-local, then each view (dstView) in the destination subpass depends on the view dstView + pViewOffsets[dependency] in the source subpass. If there is not such a view in the source subpass, then this dependency does not affect that view in the destination subpass. If the dependency is not view-local, then all views in the destination subpass depend on all views in the source subpass, and the view offset is ignored. A non-zero view offset is not allowed in a self-dependency.

The elements of pCorrelationMasks are a set of masks of views indicating that views in the same mask may exhibit spatial coherency between the views, making it more efficient to render them concurrently. Correlation masks must not have a functional effect on the results of the multiview rendering.

When multiview is enabled, at the beginning of each subpass all non-render pass state is undefined. In particular, each time CmdBeginRenderPass or CmdNextSubpass is called the graphics pipeline must be bound, any relevant descriptor sets or vertex/index buffers must be bound, and any relevant dynamic state or push constants must be set before they are used.

A multiview subpass can declare that its shaders will write per-view attributes for all views in a single invocation, by setting the SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX bit in the subpass description. The only supported per-view attributes are position and viewport mask, and per-view position and viewport masks are written to output array variables decorated with PositionPerViewNV and ViewportMaskPerViewNV, respectively. If VK_NV_viewport_array2 is not supported and enabled, ViewportMaskPerViewNV must not be used. Values written to elements of PositionPerViewNV and ViewportMaskPerViewNV must not depend on the ViewIndex. The shader must also write to an output variable decorated with Position, and the value written to Position must equal the value written to PositionPerViewNV[ViewIndex]. Similarly, if ViewportMaskPerViewNV is written to then the shader must also write to an output variable decorated with ViewportMaskNV, and the value written to ViewportMaskNV must equal the value written to ViewportMaskPerViewNV[ViewIndex]. Implementations will either use values taken from Position and ViewportMaskNV and invoke the shader once for each view, or will use values taken from PositionPerViewNV and ViewportMaskPerViewNV and invoke the shader fewer times. The values written to Position and ViewportMaskNV must not depend on the values written to PositionPerViewNV and ViewportMaskPerViewNV, or vice versa (to allow compilers to eliminate the unused outputs). All attributes that do not have *PerViewNV counterparts must not depend on ViewIndex.

Per-view attributes are all-or-nothing for a subpass. That is, all pipelines compiled against a subpass that includes the SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX bit must write per-view attributes to the *PerViewNV[] shader outputs, in addition to the non-per-view (e.g. Position) outputs. Pipelines compiled against a subpass that does not include this bit must not include the *PerViewNV[] outputs in their interfaces.

Valid Usage
Valid Usage (Implicit)

Layout


struct VkRenderPassMultiviewCreateInfo {
    VkStructureType sType;
    void const * pNext;
    uint32_t subpassCount;
    uint32_t const * pViewMasks;
    uint32_t dependencyCount;
    int32_t const * pViewOffsets;
    uint32_t correlationMaskCount;
    uint32_t const * pCorrelationMasks;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
CORRELATIONMASKCOUNT

The struct member offsets.

public static final int
DEPENDENCYCOUNT

The struct member offsets.

public static final int
PCORRELATIONMASKS

The struct member offsets.

public static final int
PNEXT

The struct member offsets.

public static final int
PVIEWMASKS

The struct member offsets.

public static final int
PVIEWOFFSETS

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STYPE

The struct member offsets.

public static final int
SUBPASSCOUNT

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
public
VkRenderPassMultiviewCreateInfo(ByteBuffer container)

Creates a VkRenderPassMultiviewCreateInfo instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static VkRenderPassMultiviewCreateInfo
calloc()

Returns a new VkRenderPassMultiviewCreateInfo instance allocated with memCalloc.

public static VkRenderPassMultiviewCreateInfo.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VkRenderPassMultiviewCreateInfo.Buffer instance allocated with memCalloc.

public static VkRenderPassMultiviewCreateInfo
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkRenderPassMultiviewCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkRenderPassMultiviewCreateInfo.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkRenderPassMultiviewCreateInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkRenderPassMultiviewCreateInfo
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkRenderPassMultiviewCreateInfo
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkRenderPassMultiviewCreateInfo.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkRenderPassMultiviewCreateInfo.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public int
correlationMaskCount()

zero or the number of correlation masks.

protected VkRenderPassMultiviewCreateInfo
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkRenderPassMultiviewCreateInfo
create()

Returns a new VkRenderPassMultiviewCreateInfo instance allocated with BufferUtils.

public static VkRenderPassMultiviewCreateInfo
create(long address)

Returns a new VkRenderPassMultiviewCreateInfo instance for the specified memory address.

public static VkRenderPassMultiviewCreateInfo.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VkRenderPassMultiviewCreateInfo.Buffer instance allocated with BufferUtils.

public static VkRenderPassMultiviewCreateInfo.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkRenderPassMultiviewCreateInfo.Buffer instance at the specified memory.

public static VkRenderPassMultiviewCreateInfo
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkRenderPassMultiviewCreateInfo.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int
dependencyCount()

zero or the number of dependencies in the render pass.

public static VkRenderPassMultiviewCreateInfo
malloc()

Returns a new VkRenderPassMultiviewCreateInfo instance allocated with memAlloc.

public static VkRenderPassMultiviewCreateInfo.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VkRenderPassMultiviewCreateInfo.Buffer instance allocated with memAlloc.

public static VkRenderPassMultiviewCreateInfo
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkRenderPassMultiviewCreateInfo instance allocated on the specified MemoryStack.

public static VkRenderPassMultiviewCreateInfo.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkRenderPassMultiviewCreateInfo.Buffer instance allocated on the specified MemoryStack.

public static VkRenderPassMultiviewCreateInfo
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkRenderPassMultiviewCreateInfo
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkRenderPassMultiviewCreateInfo.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkRenderPassMultiviewCreateInfo.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static int
ncorrelationMaskCount(long struct)

Unsafe version of correlationMaskCount.

public static void
ncorrelationMaskCount(long struct, int value)

Sets the specified value to the correlationMaskCount field of the specified struct.

public static int
ndependencyCount(long struct)

Unsafe version of dependencyCount.

public static void
ndependencyCount(long struct, int value)

Sets the specified value to the dependencyCount field of the specified struct.

public static IntBuffer
npCorrelationMasks(long struct)

Unsafe version of pCorrelationMasks.

public static void
npCorrelationMasks(long struct, IntBuffer value)

Unsafe version of pCorrelationMasks.

public static long
npNext(long struct)

Unsafe version of pNext.

public static void
npNext(long struct, long value)

Unsafe version of pNext.

public static IntBuffer
npViewMasks(long struct)

Unsafe version of pViewMasks.

public static void
npViewMasks(long struct, IntBuffer value)

Unsafe version of pViewMasks.

public static IntBuffer
npViewOffsets(long struct)

Unsafe version of pViewOffsets.

public static void
npViewOffsets(long struct, IntBuffer value)

Unsafe version of pViewOffsets.

public static int
nsType(long struct)

Unsafe version of sType.

public static void
nsType(long struct, int value)

Unsafe version of sType.

public static int
nsubpassCount(long struct)

Unsafe version of subpassCount.

public static void
nsubpassCount(long struct, int value)

Sets the specified value to the subpassCount field of the specified struct.

public IntBuffer
pCorrelationMasks()

a pointer to an array of correlationMaskCount view masks indicating sets of views that may be more efficient to render concurrently.

public VkRenderPassMultiviewCreateInfo
pCorrelationMasks(IntBuffer value)

Sets the address of the specified IntBuffer to the pCorrelationMasks field.

public long
pNext()

NULL or a pointer to a structure extending this structure.

public VkRenderPassMultiviewCreateInfo
pNext(long value)

Sets the specified value to the pNext field.

public IntBuffer
pViewMasks()

a pointer to an array of subpassCount view masks, where each mask is a bitfield of view indices describing which views rendering is broadcast to in each subpass, when multiview is enabled.

public VkRenderPassMultiviewCreateInfo
pViewMasks(IntBuffer value)

Sets the address of the specified IntBuffer to the pViewMasks field.

public IntBuffer
pViewOffsets()

a pointer to an array of dependencyCount view offsets, one for each dependency.

public VkRenderPassMultiviewCreateInfo
pViewOffsets(IntBuffer value)

Sets the address of the specified IntBuffer to the pViewOffsets field.

public VkRenderPassMultiviewCreateInfo
set(int sType, long pNext, IntBuffer pViewMasks, IntBuffer pViewOffsets, IntBuffer pCorrelationMasks)

Initializes this struct with the specified values.

public VkRenderPassMultiviewCreateInfo

Returns:

this struct
set
(VkRenderPassMultiviewCreateInfo
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
sType()

a VkStructureType value identifying this structure.

public VkRenderPassMultiviewCreateInfo
sType(int value)

Sets the specified value to the sType field.

public VkRenderPassMultiviewCreateInfo
public int
subpassCount()

zero or the number of subpasses in the render pass.

public static void
validate(long
the struct to validate
struct
)

Validates pointer members that should not be NULL.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate