Class VkCommandBufferInheritanceViewportScissorInfoNV
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkCommandBufferInheritanceViewportScissorInfoNV
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkCommandBufferInheritanceViewportScissorInfoNV extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying command buffer inheritance information.Description
If the
pNextchain ofVkCommandBufferInheritanceInfoincludes aVkCommandBufferInheritanceViewportScissorInfoNVstructure, then that structure controls whether a command buffer can inherit the following state from other command buffers:as well as the following state, with restrictions on inherited depth values and viewport count:
If
viewportScissor2DisFALSE, 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 ifviewportScissor2DisFALSE.If
viewportScissor2DisTRUE, 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
CmdExecuteCommandscommand, 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
vkCmdExecuteCommandscommand.Valid Usage
- If the inherited viewport scissor feature is not enabled,
viewportScissor2Dmust beFALSE - If the multiple viewports feature is not enabled and
viewportScissor2DisTRUE, 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 { VkStructureTypesType(); void const *pNext(); VkBool32viewportScissor2D(); uint32_tviewportDepthCount();VkViewportconst *pViewportDepths(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkCommandBufferInheritanceViewportScissorInfoNV.BufferAn array ofVkCommandBufferInheritanceViewportScissorInfoNVstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intPNEXT
PVIEWPORTDEPTHSThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPE
VIEWPORTDEPTHCOUNT
VIEWPORTSCISSOR2DThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkCommandBufferInheritanceViewportScissorInfoNV(java.nio.ByteBuffer container)Creates aVkCommandBufferInheritanceViewportScissorInfoNVinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkCommandBufferInheritanceViewportScissorInfoNVcalloc()Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated withmemCalloc.static VkCommandBufferInheritanceViewportScissorInfoNV.Buffercalloc(int capacity)Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated withmemCalloc.static VkCommandBufferInheritanceViewportScissorInfoNV.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkCommandBufferInheritanceViewportScissorInfoNVcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkCommandBufferInheritanceViewportScissorInfoNVcreate()Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated withBufferUtils.static VkCommandBufferInheritanceViewportScissorInfoNV.Buffercreate(int capacity)Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated withBufferUtils.static VkCommandBufferInheritanceViewportScissorInfoNVcreate(long address)Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance for the specified memory address.static VkCommandBufferInheritanceViewportScissorInfoNV.Buffercreate(long address, int capacity)Create aVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance at the specified memory.static VkCommandBufferInheritanceViewportScissorInfoNVcreateSafe(long address)static VkCommandBufferInheritanceViewportScissorInfoNV.BuffercreateSafe(long address, int capacity)static VkCommandBufferInheritanceViewportScissorInfoNVmalloc()Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated withmemAlloc.static VkCommandBufferInheritanceViewportScissorInfoNV.Buffermalloc(int capacity)Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated withmemAlloc.static VkCommandBufferInheritanceViewportScissorInfoNV.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated on the specifiedMemoryStack.static VkCommandBufferInheritanceViewportScissorInfoNVmalloc(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 VkViewportnpViewportDepths(long struct)Unsafe version ofpViewportDepths().static voidnpViewportDepths(long struct, 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.VkCommandBufferInheritanceViewportScissorInfoNVpNext(long value)Sets the specified value to thepNext()field.VkViewportpViewportDepths()a pointer to aVkViewportstructure specifying the expected depth range for each inherited viewport.VkCommandBufferInheritanceViewportScissorInfoNVpViewportDepths(VkViewport value)Sets the address of the specifiedVkViewportto thepViewportDepths()field.VkCommandBufferInheritanceViewportScissorInfoNVset(int sType, long pNext, boolean viewportScissor2D, int viewportDepthCount, VkViewport pViewportDepths)Initializes this struct with the specified values.VkCommandBufferInheritanceViewportScissorInfoNVset(VkCommandBufferInheritanceViewportScissorInfoNV src)Copies the specified struct data to this struct.intsizeof()intsType()the type of this structure.VkCommandBufferInheritanceViewportScissorInfoNVsType(int value)Sets the specified value to thesType()field.VkCommandBufferInheritanceViewportScissorInfoNVsType$Default()Sets theSTRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NVvalue to thesType()field.intviewportDepthCount()specifies the maximum number of viewports to inherit.VkCommandBufferInheritanceViewportScissorInfoNVviewportDepthCount(int value)Sets the specified value to theviewportDepthCount()field.booleanviewportScissor2D()specifies whether the listed dynamic state is inherited.VkCommandBufferInheritanceViewportScissorInfoNVviewportScissor2D(boolean value)Sets the specified value to theviewportScissor2D()field.
-
-
-
Constructor Detail
-
VkCommandBufferInheritanceViewportScissorInfoNV
public VkCommandBufferInheritanceViewportScissorInfoNV(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
the type of 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
@Nullable public VkViewport pViewportDepths()
a pointer to aVkViewportstructure specifying the expected depth range for each inherited viewport.
-
sType
public VkCommandBufferInheritanceViewportScissorInfoNV sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkCommandBufferInheritanceViewportScissorInfoNV sType$Default()
Sets theSTRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NVvalue to thesType()field.
-
pNext
public VkCommandBufferInheritanceViewportScissorInfoNV pNext(long value)
Sets the specified value to thepNext()field.
-
viewportScissor2D
public VkCommandBufferInheritanceViewportScissorInfoNV viewportScissor2D(boolean value)
Sets the specified value to theviewportScissor2D()field.
-
viewportDepthCount
public VkCommandBufferInheritanceViewportScissorInfoNV viewportDepthCount(int value)
Sets the specified value to theviewportDepthCount()field.
-
pViewportDepths
public VkCommandBufferInheritanceViewportScissorInfoNV pViewportDepths(@Nullable VkViewport value)
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
public static VkCommandBufferInheritanceViewportScissorInfoNV malloc()
Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkCommandBufferInheritanceViewportScissorInfoNV calloc()
Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkCommandBufferInheritanceViewportScissorInfoNV create()
Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance allocated withBufferUtils.
-
create
public static VkCommandBufferInheritanceViewportScissorInfoNV create(long address)
Returns a newVkCommandBufferInheritanceViewportScissorInfoNVinstance for the specified memory address.
-
createSafe
@Nullable public static VkCommandBufferInheritanceViewportScissorInfoNV createSafe(long address)
-
malloc
public static VkCommandBufferInheritanceViewportScissorInfoNV.Buffer malloc(int capacity)
Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkCommandBufferInheritanceViewportScissorInfoNV.Buffer calloc(int capacity)
Returns a newVkCommandBufferInheritanceViewportScissorInfoNV.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkCommandBufferInheritanceViewportScissorInfoNV.Buffer create(int capacity)
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
@Nullable public static 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:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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
@Nullable public static VkViewport npViewportDepths(long struct)
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
public static void npViewportDepths(long struct, @Nullable VkViewport value)Unsafe version ofpViewportDepths.
-
-