Class VkCommandBufferInheritanceViewportScissorInfoNV

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkCommandBufferInheritanceViewportScissorInfoNV>
org.lwjgl.vulkan.VkCommandBufferInheritanceViewportScissorInfoNV
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VkCommandBufferInheritanceViewportScissorInfoNV extends org.lwjgl.system.Struct<VkCommandBufferInheritanceViewportScissorInfoNV> implements org.lwjgl.system.NativeResource
Structure specifying command buffer inheritance information.
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:

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 i being the index of the executed command buffer in the pCommandBuffers array of CmdExecuteCommands, if i > 0 and any secondary command buffer from index 0 to i-1 modifies 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 CmdExecuteCommands command 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 n being its viewport index, then if n ≥ viewportDepthCount, or if either VkViewport::minDepth or VkViewport::maxDepth are not equal to the respective values of the nth element of pViewportDepths, 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 inheritedViewportScissor2D feature is not enabled, viewportScissor2D must be FALSE
  • If the multiViewport feature is not enabled and viewportScissor2D is TRUE, then viewportDepthCount must be 1
  • If viewportScissor2D is TRUE, then viewportDepthCount must be greater than 0
  • If viewportScissor2D is TRUE, then pViewportDepths must be a valid pointer to an array of viewportDepthCount valid VkViewport structures, except any requirements on x, y, width, and height do not apply
  • If viewportScissor2D is TRUE, then the command buffer must be recorded with the COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT
Valid Usage (Implicit)
See Also

VkViewport

Layout


 struct VkCommandBufferInheritanceViewportScissorInfoNV {
     VkStructureType sType();
     void const * pNext();
     VkBool32 viewportScissor2D();
     uint32_t viewportDepthCount();
     VkViewport const * pViewportDepths();
 }