Class VkCommandBufferInheritanceViewportScissorInfoNV
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
If the pNext chain of VkCommandBufferInheritanceInfo includes a VkCommandBufferInheritanceViewportScissorInfoNV structure, then that structure controls whether a command buffer can inherit the following state from other command buffers:
DYNAMIC_STATE_SCISSORDYNAMIC_STATE_SCISSOR_WITH_COUNTDYNAMIC_STATE_DISCARD_RECTANGLE_EXTDYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXTDYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT
as well as the following state, with restrictions on inherited depth values and viewport count:
If viewportScissor2D is FALSE, then the command buffer does not inherit the listed dynamic state, and should set this state itself. If this structure is not present, the behavior is as if viewportScissor2D is FALSE.
If viewportScissor2D is TRUE, then the listed dynamic state is inherited, and the command buffer must not set this state, except that the viewport and scissor count may be set by binding a graphics pipeline that does not specify this state as dynamic.
Note
Due to this restriction, applications should ensure either all or none of the graphics pipelines bound in this secondary command buffer use dynamic viewport/scissor counts.
When the command buffer is executed as part of a the execution of a CmdExecuteCommands command, the inherited state (if enabled) is determined by the following procedure, performed separately for each dynamic state, and separately for each value for dynamic state that consists of multiple values (e.g. multiple viewports).
- With
ibeing the index of the executed command buffer in thepCommandBuffersarray ofCmdExecuteCommands, ifi > 0and any secondary command buffer from index0toi-1modifies the state, the inherited state is provisionally set to the final value set by the last such secondary command buffer. Binding a graphics pipeline defining the state statically is equivalent to setting the state to an undefined value. - Otherwise, the tentatative inherited state is that of the primary command buffer at the point the
CmdExecuteCommandscommand was recorded; if the state is undefined, then so is the provisional inherited state. - If the provisional inherited state is an undefined value, then the state is not inherited.
- If the provisional inherited state is a viewport, with
nbeing its viewport index, then ifn ≥ viewportDepthCount, or if eitherVkViewport::minDepthorVkViewport::maxDepthare not equal to the respective values of thenthelement ofpViewportDepths, then the state is not inherited. - If the provisional inherited state passes both checks, then it becomes the actual inherited state.
Note
There is no support for inheriting dynamic state from a secondary command buffer executed as part of a different vkCmdExecuteCommands command.
Valid Usage
- If the
inheritedViewportScissor2Dfeature is not enabled,viewportScissor2Dmust beFALSE - If the
multiViewportfeature is not enabled andviewportScissor2DisTRUE, thenviewportDepthCountmust be 1 - If
viewportScissor2DisTRUE, thenviewportDepthCountmust be greater than 0 - If
viewportScissor2DisTRUE, thenpViewportDepthsmust be a valid pointer to an array ofviewportDepthCountvalidVkViewportstructures, except any requirements onx,y,width, andheightdo not apply - If
viewportScissor2DisTRUE, then the command buffer must be recorded with theCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT
Valid Usage (Implicit)
See Also
Layout
struct VkCommandBufferInheritanceViewportScissorInfoNV {
VkStructureType sType();
void const * pNext();
VkBool32 viewportScissor2D();
uint32_t viewportDepthCount();
VkViewport const * pViewportDepths();
}-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn array ofVkCommandBufferInheritanceViewportScissorInfoNVstructs.Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCreates aVkCommandBufferInheritanceViewportScissorInfoNVinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptioncalloc()Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.calloc(org.lwjgl.system.MemoryStack stack) Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.create()Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated withBufferUtils.create(int capacity) Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated withBufferUtils.create(long address) Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance for the specified memory address.create(long address, int capacity) Create aVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance at the specified memory.static @Nullable VkCommandBufferInheritanceViewportScissorInfoNVcreateSafe(long address) static @Nullable VkCommandBufferInheritanceViewportScissorInfoNV.BuffercreateSafe(long address, int capacity) malloc()Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated on the specifiedMemoryStack.malloc(org.lwjgl.system.MemoryStack stack) Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated on the specifiedMemoryStack.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static @Nullable VkViewportnpViewportDepths(long struct) Unsafe version ofpViewportDepths().static voidnpViewportDepths(long struct, @Nullable VkViewport value) Unsafe version ofpViewportDepths.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.static intnviewportDepthCount(long struct) Unsafe version ofviewportDepthCount().static voidnviewportDepthCount(long struct, int value) Unsafe version ofviewportDepthCount.static intnviewportScissor2D(long struct) Unsafe version ofviewportScissor2D().static voidnviewportScissor2D(long struct, int value) Unsafe version ofviewportScissor2D.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.@Nullable VkViewporta pointer to aVkViewportstructure specifying the expected depth range for each inherited viewport.pViewportDepths(@Nullable VkViewport value) Sets the address of the specifiedVkViewportto thepViewportDepths()field.set(int sType, long pNext, boolean viewportScissor2D, int viewportDepthCount, @Nullable VkViewport pViewportDepths) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NVvalue to thesType()field.intspecifies the maximum number of viewports to inherit.viewportDepthCount(int value) Sets the specified value to theviewportDepthCount()field.booleanspecifies whether the listed dynamic state is inherited.viewportScissor2D(boolean value) Sets the specified value to theviewportScissor2D()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
VIEWPORTSCISSOR2D
public static final int VIEWPORTSCISSOR2DThe struct member offsets. -
VIEWPORTDEPTHCOUNT
public static final int VIEWPORTDEPTHCOUNTThe struct member offsets. -
PVIEWPORTDEPTHS
public static final int PVIEWPORTDEPTHSThe struct member offsets.
-
-
Constructor Details
-
VkCommandBufferInheritanceViewportScissorInfoNV
Creates aVkCommandBufferInheritanceViewportScissorInfoNVinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkCommandBufferInheritanceViewportScissorInfoNV>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
viewportScissor2D
public boolean viewportScissor2D()specifies whether the listed dynamic state is inherited. -
viewportDepthCount
public int viewportDepthCount()specifies the maximum number of viewports to inherit. WhenviewportScissor2DisFALSE, the behavior is as if this value is zero. -
pViewportDepths
a pointer to aVkViewportstructure specifying the expected depth range for each inherited viewport. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NVvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
viewportScissor2D
Sets the specified value to theviewportScissor2D()field. -
viewportDepthCount
Sets the specified value to theviewportDepthCount()field. -
pViewportDepths
Sets the address of the specifiedVkViewportto thepViewportDepths()field. -
set
public VkCommandBufferInheritanceViewportScissorInfoNV set(int sType, long pNext, boolean viewportScissor2D, int viewportDepthCount, @Nullable VkViewport pViewportDepths) Initializes this struct with the specified values. -
set
public VkCommandBufferInheritanceViewportScissorInfoNV set(VkCommandBufferInheritanceViewportScissorInfoNV src) Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated withBufferUtils. -
create
Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkCommandBufferInheritanceViewportScissorInfoNV.Buffer create(long address, int capacity) Create aVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
public static @Nullable VkCommandBufferInheritanceViewportScissorInfoNV.Buffer createSafe(long address, int capacity) -
malloc
public static VkCommandBufferInheritanceViewportScissorInfoNV malloc(org.lwjgl.system.MemoryStack stack) Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkCommandBufferInheritanceViewportScissorInfoNV calloc(org.lwjgl.system.MemoryStack stack) Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkCommandBufferInheritanceViewportScissorInfoNV.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static VkCommandBufferInheritanceViewportScissorInfoNV.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType(). -
npNext
public static long npNext(long struct) Unsafe version ofpNext(). -
nviewportScissor2D
public static int nviewportScissor2D(long struct) Unsafe version ofviewportScissor2D(). -
nviewportDepthCount
public static int nviewportDepthCount(long struct) Unsafe version ofviewportDepthCount(). -
npViewportDepths
Unsafe version ofpViewportDepths(). -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nviewportScissor2D
public static void nviewportScissor2D(long struct, int value) Unsafe version ofviewportScissor2D. -
nviewportDepthCount
public static void nviewportDepthCount(long struct, int value) Unsafe version ofviewportDepthCount. -
npViewportDepths
Unsafe version ofpViewportDepths.
-