Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Name
VK_NV_device_generated_commands - device extension
VK_NV_device_generated_commands
- Name String
VK_NV_device_generated_commands
- Extension Type
- Device extension
- Registered Extension Number
- 278
- Revision
- 3
- Extension and Version Dependencies
- Requires support for Vulkan 1.1
- Requires
VK_KHR_buffer_device_address
to be enabled for any device-level functionality
- Contact
Other Extension Metadata
- Last Modified Date
- 2020-02-20
- Interactions and External Dependencies
- This extension requires Vulkan 1.1
- This extension requires
VK_EXT_buffer_device_address
orVK_KHR_buffer_device_address
or Vulkan 1.2 for the ability to bind vertex and index buffers on the device. - This extension interacts with
VK_NV_mesh_shader
. If the latter extension is not supported, remove the command token to initiate mesh tasks drawing in this extension.
- Contributors
- Christoph Kubisch, NVIDIA
- Pierre Boudier, NVIDIA
- Jeff Bolz, NVIDIA
- Eric Werness, NVIDIA
- Yuriy O’Donnell, Epic Games
- Baldur Karlsson, Valve
- Mathias Schott, NVIDIA
- Tyson Smith, NVIDIA
- Ingo Esser, NVIDIA
Description
This extension allows the device to generate a number of critical graphics commands for command buffers.
When rendering a large number of objects, the device can be leveraged to implement a number of critical functions, like updating matrices, or implementing occlusion culling, frustum culling, front to back sorting, etc. Implementing those on the device does not require any special extension, since an application is free to define its own data structures, and just process them using shaders.
However, if the application desires to quickly kick off the rendering of the final stream of objects, then unextended Vulkan forces the application to read back the processed stream and issue graphics command from the host. For very large scenes, the synchronization overhead and cost to generate the command buffer can become the bottleneck. This extension allows an application to generate a device side stream of state changes and commands, and convert it efficiently into a command buffer without having to read it back to the host.
Furthermore, it allows incremental changes to such command buffers by manipulating only partial sections of a command stream — for example pipeline bindings. Unextended Vulkan requires re-creation of entire command buffers in such a scenario, or updates synchronized on the host.
The intended usage for this extension is for the application to:
- create
Buffer
objects and retrieve physical addresses from them viagetBufferDeviceAddressEXT
- create a graphics pipeline using
GraphicsPipelineShaderGroupsCreateInfoNV
for the ability to change shaders on the device. - create a
IndirectCommandsLayoutNV
, which lists theIndirectCommandsTokenTypeNV
it wants to dynamically execute as an atomic command sequence. This step likely involves some internal device code compilation, since the intent is for the GPU to generate the command buffer in the pipeline. - fill the input stream buffers with the data for each of the inputs it needs. Each input is an array that will be filled with token-dependent data.
- set up a preprocess
Buffer
that uses memory according to the information retrieved viagetGeneratedCommandsMemoryRequirementsNV
. - optionally preprocess the generated content using
cmdPreprocessGeneratedCommandsNV
, for example on an asynchronous compute queue, or for the purpose of re-using the data in multiple executions. - call
cmdExecuteGeneratedCommandsNV
to create and execute the actual device commands for all sequences based on the inputs provided.
For each draw in a sequence, the following can be specified:
- a different shader group
- a number of vertex buffer bindings
- a different index buffer, with an optional dynamic offset and index type
- a number of different push constants
- a flag that encodes the primitive winding
While the GPU can be faster than a CPU to generate the commands, it will not happen asynchronously to the device, therefore the primary use-case is generating “less” total work (occlusion culling, classification to use specialized shaders, etc.).
New Object Types
New Commands
cmdExecuteGeneratedCommandsNV
cmdPreprocessGeneratedCommandsNV
createIndirectCommandsLayoutNV
destroyIndirectCommandsLayoutNV
getGeneratedCommandsMemoryRequirementsNV
New Structures
BindShaderGroupIndirectCommandNV
BindVertexBufferIndirectCommandNV
GeneratedCommandsInfoNV
GeneratedCommandsMemoryRequirementsInfoNV
GraphicsShaderGroupCreateInfoNV
IndirectCommandsLayoutCreateInfoNV
IndirectCommandsLayoutTokenNV
IndirectCommandsStreamNV
SetStateFlagsIndirectCommandNV
Extending
GraphicsPipelineCreateInfo
:Extending
PhysicalDeviceFeatures2
,DeviceCreateInfo
:Extending
PhysicalDeviceProperties2
:
New Enums
New Bitmasks
New Enum Constants
NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION
Extending
AccessFlagBits
:Extending
ObjectType
:Extending
PipelineCreateFlagBits
:Extending
PipelineStageFlagBits
:Extending
StructureType
:STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV
STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV
STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV
STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV
STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV
STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV
STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV
STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV
Issues
1) How to name this extension ?
VK_NV_device_generated_commands
As usual, one of the hardest issues ;)
Alternatives: VK_gpu_commands
, VK_execute_commands
,
VK_device_commands
, VK_device_execute_commands
, VK_device_execute
,
VK_device_created_commands
, VK_device_recorded_commands
,
VK_device_generated_commands
VK_indirect_generated_commands
2) Should we use a serial stateful token stream or stateless sequence descriptions?
Similarly to Pipeline
, fixed layouts have the
most likelihood to be cross-vendor adoptable. They also benefit from
being processable in parallel. This is a different design choice
compared to the serial command stream generated through
GL_NV_command_list
.
3) How to name a sequence description?
VkIndirectCommandsLayout
as in the NVX extension predecessor.
Alternative: VkGeneratedCommandsLayout
4) Do we want to provide indirectCommands
inputs with layout or at
indirectCommands
time?
Separate layout from data as Vulkan does. Provide full flexibility for
indirectCommands
.
5) Should the input be provided as SoA or AoS?
Both ways are desirable. AoS can provide portability to other APIs and easier to setup, while SoA allows to update individual inputs in a cache-efficient manner, when others remain static.
6) How do we make developers aware of the memory requirements of implementation-dependent data used for the generated commands?
Make the API explicit and introduce a preprocess
Buffer
. Developers have to allocate it using
getGeneratedCommandsMemoryRequirementsNV
.
In the NVX version the requirements were hidden implicitly as part of
the command buffer reservation process, however as the memory
requirements can be substantial, we want to give developers the ability
to budget the memory themselves. By lowering the maxSequencesCount
the
memory consumption can be reduced. Furthermore reuse of the memory is
possible, for example for doing explicit preprocessing and execution in
a ping-pong fashion.
The actual buffer size is implementation-dependent and may be zero, i.e. not always required.
When making use of Graphics Shader Groups, the programs should behave similar with regards to vertex inputs, clipping and culling outputs of the geometry stage, as well as sample shading behavior in fragment shaders, to reduce the amount of the worst-case memory approximation.
7) Should we allow additional per-sequence dynamic state changes?
Yes
Introduced a lightweight indirect state flag IndirectStateFlagBitsNV
.
So far only switching front face winding state is exposed. Especially in
CAD/DCC mirrored transforms that require such changes are common, and
similar flexibility is given in the ray tracing instance description.
The flag could be extended further, for example to switch between primitive-lists or -strips, or make other state modifications.
Furthermore, as new tokens can be added easily, future extension could
add the ability to change any
DynamicState
.
8) How do we allow re-using already “generated” indirectCommands
?
Expose a preprocessBuffer
to reuse implementation-dependencyFlags
data. Set the isPreprocessed
to true in
cmdExecuteGeneratedCommandsNV
.
9) Under which conditions is cmdExecuteGeneratedCommandsNV
legal?
It behaves like a regular draw call command.
10) Is cmdPreprocessGeneratedCommandsNV
copying the input data or
referencing it?
There are multiple implementations possible:
- one could have some emulation code that parses the inputs, and generates an output command buffer, therefore copying the inputs.
- one could just reference the inputs, and have the processing done in pipe at execution time.
If the data is mandated to be copied, then it puts a penalty on implementation that could process the inputs directly in pipe. If the data is “referenced”, then it allows both types of implementation.
The inputs are “referenced”, and must not be modified after the call
to cmdExecuteGeneratedCommandsNV
has completed.
11) Which buffer usage flags are required for the buffers referenced by
GeneratedCommandsInfoNV
?
Reuse existing
BUFFER_USAGE_INDIRECT_BUFFER_BIT
GeneratedCommandsInfoNV
::preprocessBuffer
GeneratedCommandsInfoNV
::sequencesCountBuffer
GeneratedCommandsInfoNV
::sequencesIndexBuffer
IndirectCommandsStreamNV
::buffer
12) In which pipeline stage does the device generated command expansion happen?
cmdPreprocessGeneratedCommandsNV
is treated as if it occurs in a
separate logical pipeline from either graphics or compute, and that
pipeline only includes
PIPELINE_STAGE_TOP_OF_PIPE_BIT
,
a new stage
PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV
,
and
PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
.
This new stage has two corresponding new access types,
ACCESS_COMMAND_PREPROCESS_READ_BIT_NV
and
ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV
,
used to synchronize reading the buffer inputs and writing the preprocess
memory output.
The generated output written in the preprocess buffer memory by
cmdExecuteGeneratedCommandsNV
is considered to be consumed by the
PIPELINE_STAGE_DRAW_INDIRECT_BIT
pipeline stage.
Thus, to synchronize from writing the input buffers to preprocessing via
cmdPreprocessGeneratedCommandsNV
, use:
dstStageMask
=PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV
dstAccessMask
=ACCESS_COMMAND_PREPROCESS_READ_BIT_NV
To synchronize from cmdPreprocessGeneratedCommandsNV
to executing the
generated commands by cmdExecuteGeneratedCommandsNV
, use:
srcStageMask
=PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV
srcAccessMask
=ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV
dstStageMask
=PIPELINE_STAGE_DRAW_INDIRECT_BIT
dstAccessMask
=ACCESS_INDIRECT_COMMAND_READ_BIT
When cmdExecuteGeneratedCommandsNV
is used with a isPreprocessed
of
FALSE
, the generated commands are
implicitly preprocessed, therefore one only needs to synchronize the
inputs via:
dstStageMask
=PIPELINE_STAGE_DRAW_INDIRECT_BIT
dstAccessMask
=ACCESS_INDIRECT_COMMAND_READ_BIT
13) What if most token data is “static”, but we frequently want to render a subsection?
Added “sequencesIndexBuffer”. This allows to easier sort and filter what should actually be executed.
14) What are the changes compared to the previous NVX extension?
- Compute dispatch support was removed (was never implemented in drivers). There are different approaches how dispatching from the device should work, hence we defer this to a future extension.
- The
ObjectTableNVX
was replaced by using physical buffer addresses and introducing Shader Groups for the graphics pipeline. - Less state changes are possible overall, but the important operations are still there (reduces complexity of implementation).
- The API was redesigned so all inputs must be passed at both preprocessing and execution time (this was implicit in NVX, now it is explicit)
- The reservation of intermediate command space is now mandatory and explicit through a preprocess buffer.
- The
IndirectStateFlagBitsNV
were introduced
15) When porting from other APIs, their indirect buffers may use different enums, for example for index buffer types. How to solve this?
Added “pIndexTypeValues” to map custom uint32_t
values to
corresponding IndexType
.
16) Do we need more shader group state overrides?
The NVX version allowed all PSO states to be different, however as the goal is not to replace all state setup, but focus on highly-frequent state changes for drawing lots of objects, we reduced the amount of state overrides. Especially VkPipelineLayout as well as VkRenderPass configuration should be left static, the rest is still open for discussion.
The current focus is just to allow VertexInput changes as well as shaders, while all shader groups use the same shader stages.
Too much flexibility will increase the test coverage requirement as well. However, further extensions could allow more dynamic state as well.
17) Do we need more detailed physical device feature queries/enables?
An EXT version would need detailed implementor feedback to come up with a good set of features. Please contact us if you are interested, we are happy to make more features optional, or add further restrictions to reduce the minimum feature set of an EXT.
18) Is there an interaction with VK_KHR_pipeline_library planned?
Yes, a future version of this extension will detail the interaction, once VK_KHR_pipeline_library is no longer provisional.
Example Code
Open-Source samples illustrating the usage of the extension can be found at the following location (may not yet exist at time of writing):
https://github.com/nvpro-samples/vk_device_generated_cmds
Version History
Revision 1, 2020-02-20 (Christoph Kubisch)
- Initial version
Revision 2, 2020-03-09 (Christoph Kubisch)
- Remove VK_EXT_debug_report interactions
Revision 3, 2020-03-09 (Christoph Kubisch)
- Fix naming VkPhysicalDeviceGenerated to VkPhysicalDeviceDeviceGenerated
See Also
BindIndexBufferIndirectCommandNV
, BindShaderGroupIndirectCommandNV
,
BindVertexBufferIndirectCommandNV
, GeneratedCommandsInfoNV
,
GeneratedCommandsMemoryRequirementsInfoNV
,
GraphicsPipelineShaderGroupsCreateInfoNV
,
GraphicsShaderGroupCreateInfoNV
, IndirectCommandsLayoutCreateInfoNV
,
IndirectCommandsLayoutNV
,
IndirectCommandsLayoutTokenNV
,
IndirectCommandsLayoutUsageFlagBitsNV
,
IndirectCommandsLayoutUsageFlagsNV
, IndirectCommandsStreamNV
,
IndirectCommandsTokenTypeNV
, IndirectStateFlagBitsNV
,
IndirectStateFlagsNV
,
PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
,
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
,
SetStateFlagsIndirectCommandNV
, cmdBindPipelineShaderGroupNV
,
cmdExecuteGeneratedCommandsNV
, cmdPreprocessGeneratedCommandsNV
,
createIndirectCommandsLayoutNV
, destroyIndirectCommandsLayoutNV
,
getGeneratedCommandsMemoryRequirementsNV
Document Notes
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- cmdExecuteGeneratedCommandsNV :: forall io. MonadIO io => CommandBuffer -> ("isPreprocessed" ::: Bool) -> GeneratedCommandsInfoNV -> io ()
- cmdPreprocessGeneratedCommandsNV :: forall io. MonadIO io => CommandBuffer -> GeneratedCommandsInfoNV -> io ()
- cmdBindPipelineShaderGroupNV :: forall io. MonadIO io => CommandBuffer -> PipelineBindPoint -> Pipeline -> ("groupIndex" ::: Word32) -> io ()
- getGeneratedCommandsMemoryRequirementsNV :: forall a io. (Extendss MemoryRequirements2 a, PokeChain a, PeekChain a, MonadIO io) => Device -> GeneratedCommandsMemoryRequirementsInfoNV -> io (MemoryRequirements2 a)
- createIndirectCommandsLayoutNV :: forall io. MonadIO io => Device -> IndirectCommandsLayoutCreateInfoNV -> ("allocator" ::: Maybe AllocationCallbacks) -> io IndirectCommandsLayoutNV
- withIndirectCommandsLayoutNV :: forall io r. MonadIO io => Device -> IndirectCommandsLayoutCreateInfoNV -> Maybe AllocationCallbacks -> (io IndirectCommandsLayoutNV -> (IndirectCommandsLayoutNV -> io ()) -> r) -> r
- destroyIndirectCommandsLayoutNV :: forall io. MonadIO io => Device -> IndirectCommandsLayoutNV -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- data PhysicalDeviceDeviceGeneratedCommandsFeaturesNV = PhysicalDeviceDeviceGeneratedCommandsFeaturesNV {}
- data PhysicalDeviceDeviceGeneratedCommandsPropertiesNV = PhysicalDeviceDeviceGeneratedCommandsPropertiesNV {
- maxGraphicsShaderGroupCount :: Word32
- maxIndirectSequenceCount :: Word32
- maxIndirectCommandsTokenCount :: Word32
- maxIndirectCommandsStreamCount :: Word32
- maxIndirectCommandsTokenOffset :: Word32
- maxIndirectCommandsStreamStride :: Word32
- minSequencesCountBufferOffsetAlignment :: Word32
- minSequencesIndexBufferOffsetAlignment :: Word32
- minIndirectCommandsBufferOffsetAlignment :: Word32
- data GraphicsShaderGroupCreateInfoNV = GraphicsShaderGroupCreateInfoNV {}
- data GraphicsPipelineShaderGroupsCreateInfoNV = GraphicsPipelineShaderGroupsCreateInfoNV {}
- data BindShaderGroupIndirectCommandNV = BindShaderGroupIndirectCommandNV {
- groupIndex :: Word32
- data BindIndexBufferIndirectCommandNV = BindIndexBufferIndirectCommandNV {}
- data BindVertexBufferIndirectCommandNV = BindVertexBufferIndirectCommandNV {
- bufferAddress :: DeviceAddress
- size :: Word32
- stride :: Word32
- data SetStateFlagsIndirectCommandNV = SetStateFlagsIndirectCommandNV {}
- data IndirectCommandsStreamNV = IndirectCommandsStreamNV {
- buffer :: Buffer
- offset :: DeviceSize
- data IndirectCommandsLayoutTokenNV = IndirectCommandsLayoutTokenNV {
- tokenType :: IndirectCommandsTokenTypeNV
- stream :: Word32
- offset :: Word32
- vertexBindingUnit :: Word32
- vertexDynamicStride :: Bool
- pushconstantPipelineLayout :: PipelineLayout
- pushconstantShaderStageFlags :: ShaderStageFlags
- pushconstantOffset :: Word32
- pushconstantSize :: Word32
- indirectStateFlags :: IndirectStateFlagsNV
- indexTypes :: Vector IndexType
- indexTypeValues :: Vector Word32
- data IndirectCommandsLayoutCreateInfoNV = IndirectCommandsLayoutCreateInfoNV {}
- data GeneratedCommandsInfoNV = GeneratedCommandsInfoNV {
- pipelineBindPoint :: PipelineBindPoint
- pipeline :: Pipeline
- indirectCommandsLayout :: IndirectCommandsLayoutNV
- streams :: Vector IndirectCommandsStreamNV
- sequencesCount :: Word32
- preprocessBuffer :: Buffer
- preprocessOffset :: DeviceSize
- preprocessSize :: DeviceSize
- sequencesCountBuffer :: Buffer
- sequencesCountOffset :: DeviceSize
- sequencesIndexBuffer :: Buffer
- sequencesIndexOffset :: DeviceSize
- data GeneratedCommandsMemoryRequirementsInfoNV = GeneratedCommandsMemoryRequirementsInfoNV {}
- type IndirectCommandsLayoutUsageFlagsNV = IndirectCommandsLayoutUsageFlagBitsNV
- newtype IndirectCommandsLayoutUsageFlagBitsNV where
- IndirectCommandsLayoutUsageFlagBitsNV Flags
- pattern INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV :: IndirectCommandsLayoutUsageFlagBitsNV
- pattern INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV :: IndirectCommandsLayoutUsageFlagBitsNV
- pattern INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV :: IndirectCommandsLayoutUsageFlagBitsNV
- type IndirectStateFlagsNV = IndirectStateFlagBitsNV
- newtype IndirectStateFlagBitsNV where
- newtype IndirectCommandsTokenTypeNV where
- IndirectCommandsTokenTypeNV Int32
- pattern INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV :: IndirectCommandsTokenTypeNV
- pattern INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV :: IndirectCommandsTokenTypeNV
- pattern INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV :: IndirectCommandsTokenTypeNV
- pattern INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV :: IndirectCommandsTokenTypeNV
- pattern INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV :: IndirectCommandsTokenTypeNV
- pattern INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV :: IndirectCommandsTokenTypeNV
- pattern INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV :: IndirectCommandsTokenTypeNV
- pattern INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV :: IndirectCommandsTokenTypeNV
- pattern INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV :: IndirectCommandsTokenTypeNV
- type NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION = 3
- pattern NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION :: forall a. Integral a => a
- type NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NV_device_generated_commands"
- pattern NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- newtype IndirectCommandsLayoutNV = IndirectCommandsLayoutNV Word64
Documentation
cmdExecuteGeneratedCommandsNV Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> ("isPreprocessed" ::: Bool) |
|
-> GeneratedCommandsInfoNV |
|
-> io () |
vkCmdExecuteGeneratedCommandsNV - Generate and execute commands on the device
Valid Usage
- If a
Sampler
created withmagFilter
orminFilter
equal toFILTER_LINEAR
andcompareEnable
equal toFALSE
is used to sample aImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
Sampler
created withmipmapMode
equal toSAMPLER_MIPMAP_MODE_LINEAR
andcompareEnable
equal toFALSE
is used to sample aImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
ImageView
is sampled with depth comparison, the image view’s format features must containFORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT
- If a
ImageView
is accessed using atomic operations as a result of this command, then the image view’s format features must containFORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
- If a
ImageView
is sampled withFILTER_CUBIC_EXT
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
- Any
ImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must have aImageViewType
and format that supports cubic filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT
::filterCubic
returned bygetPhysicalDeviceImageFormatProperties2
- Any
ImageView
being sampled withFILTER_CUBIC_EXT
with a reduction mode of eitherSAMPLER_REDUCTION_MODE_MIN
orSAMPLER_REDUCTION_MODE_MAX
as a result of this command must have aImageViewType
and format that supports cubic filtering together with minmax filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT
::filterCubicMinmax
returned bygetPhysicalDeviceImageFormatProperties2
- Any
Image
created with aImageCreateInfo
::flags
containingIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
sampled as a result of this command must only be sampled using aSamplerAddressMode
ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
- For any
ImageView
being written as a storage image where the image format field of theOpTypeImage
isUnknown
, the view’s format features must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT
- For any
ImageView
being read as a storage image where the image format field of theOpTypeImage
isUnknown
, the view’s format features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT
- For any
BufferView
being written as a storage texel buffer where the image format field of theOpTypeImage
isUnknown
, the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT
- Any
BufferView
being read as a storage texel buffer where the image format field of theOpTypeImage
isUnknown
then the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT
- For each set n
that is statically used by the
Pipeline
bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aPipelineLayout
that is compatible for set n, with thePipelineLayout
used to create the currentPipeline
, as described in ??? - If the
maintenance4
feature is not enabled, then for each push constant that is
statically used by the
Pipeline
bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aPipelineLayout
that is compatible for push constants, with thePipelineLayout
used to create the currentPipeline
, as described in ??? - Descriptors in
each bound descriptor set, specified via
cmdBindDescriptorSets
, must be valid if they are statically used by thePipeline
bound to the pipeline bind point used by this command and the boundPipeline
was not created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
- If the descriptors
used by the
Pipeline
bound to the pipeline bind point were specified viacmdBindDescriptorSets
, the boundPipeline
must have been created withoutPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
- Descriptors in
bound descriptor buffers, specified via
cmdSetDescriptorBufferOffsetsEXT
, must be valid if they are dynamically used by thePipeline
bound to the pipeline bind point used by this command and the boundPipeline
was created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
- If the descriptors
used by the
Pipeline
bound to the pipeline bind point were specified viacmdSetDescriptorBufferOffsetsEXT
, the boundPipeline
must have been created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
- If a descriptor is
dynamically used with a
Pipeline
created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
, the descriptor memory must be resident - A valid pipeline must be bound to the pipeline bind point used by this command
- There must not
have been any calls to dynamic state setting commands for any state
not specified as dynamic in the
Pipeline
object bound to the pipeline bind point used by this command, since that pipeline was bound - If the
Pipeline
object bound to the pipeline bind point used by this command accesses aSampler
object that uses unnormalized coordinates, that sampler must not be used to sample from anyImage
with aImageView
of the typeIMAGE_VIEW_TYPE_3D
,IMAGE_VIEW_TYPE_CUBE
,IMAGE_VIEW_TYPE_1D_ARRAY
,IMAGE_VIEW_TYPE_2D_ARRAY
orIMAGE_VIEW_TYPE_CUBE_ARRAY
, in any shader stage - If the
Pipeline
object bound to the pipeline bind point used by this command accesses aSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions withImplicitLod
,Dref
orProj
in their name, in any shader stage - If the
Pipeline
object bound to the pipeline bind point used by this command accesses aSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions that includes a LOD bias or any offset values, in any shader stage - If any
stage of the
Pipeline
object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT
orPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT
foruniformBuffers
, and the robustBufferAccess feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If any
stage of the
Pipeline
object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT
orPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT
forstorageBuffers
, and the robustBufferAccess feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If
commandBuffer
is an unprotected command buffer and protectedNoFault is not supported, any resource accessed by thePipeline
object bound to the pipeline bind point used by this command must not be a protected resource - If the
Pipeline
object bound to the pipeline bind point used by this command accesses aSampler
orImageView
object that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*
orOpImageSparseSample*
instructions - If the
Pipeline
object bound to the pipeline bind point used by this command accesses aSampler
orImageView
object that enables sampler Y′CBCR conversion, that object must not use theConstOffset
andOffset
operands - If a
ImageView
is accessed as a result of this command, then the image view’sviewType
must match theDim
operand of theOpTypeImage
as described in ??? - If a
ImageView
is accessed as a result of this command, then the image view’sformat
must match the numeric format from theSampled
Type
operand of theOpTypeImage
as described in the SPIR-V Sampled Type column of the ??? table - If a
ImageView
is accessed usingOpImageWrite
as a result of this command, then theType
of theTexel
operand of that instruction must have at least as many components as the image view’s format - If a
BufferView
is accessed usingOpImageWrite
as a result of this command, then theType
of theTexel
operand of that instruction must have at least as many components as the buffer view’s format - If a
ImageView
with aFormat
that has a 64-bit component width is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 64 - If a
ImageView
with aFormat
that has a component width less than 64-bit is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 32 - If a
BufferView
with aFormat
that has a 64-bit component width is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 64 - If a
BufferView
with aFormat
that has a component width less than 64-bit is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 32 -
If the
sparseImageInt64Atomics
feature is not enabled,
Image
objects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BIT
flag must not be accessed by atomic instructions through anOpTypeImage
with aSampledType
with aWidth
of 64 by this command -
If the
sparseImageInt64Atomics
feature is not enabled,
Buffer
objects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BIT
flag must not be accessed by atomic instructions through anOpTypeImage
with aSampledType
with aWidth
of 64 by this command -
If
OpImageWeightedSampleQCOM
is used to sample aImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM
-
If
OpImageWeightedSampleQCOM
uses aImageView
as a sample weight image as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM
- If
OpImageBoxFilterQCOM
is used to sample aImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM
-
If
OpImageBlockMatchSSDQCOM
is used to read from anImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM
-
If
OpImageBlockMatchSADQCOM
is used to read from anImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM
-
If
OpImageBlockMatchSADQCOM
or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation -
If
OpImageWeightedSampleQCOM
,OpImageBoxFilterQCOM
,OpImageBlockMatchSSDQCOM
, orOpImageBlockMatchSADQCOM
uses aSampler
as a result of this command, then the sampler must have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM
-
If any command other than
OpImageWeightedSampleQCOM
,OpImageBoxFilterQCOM
,OpImageBlockMatchSSDQCOM
, orOpImageBlockMatchSADQCOM
uses aSampler
as a result of this command, then the sampler must not have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM
- Any shader invocation executed by this command must terminate
- The current
render pass must be
compatible
with the
renderPass
member of theGraphicsPipelineCreateInfo
structure specified when creating thePipeline
bound toPIPELINE_BIND_POINT_GRAPHICS
- The subpass
index of the current render pass must be equal to the
subpass
member of theGraphicsPipelineCreateInfo
structure specified when creating thePipeline
bound toPIPELINE_BIND_POINT_GRAPHICS
- If any shader statically accesses an input attachment, a valid descriptor must be bound to the pipeline via a descriptor set
- If any
shader executed by this pipeline accesses an
OpTypeImage
variable with aDim
operand ofSubpassData
, it must be decorated with anInputAttachmentIndex
that corresponds to a valid input attachment in the current subpass - Input attachment
views accessed in a subpass must be created with the same
Format
as the corresponding subpass definition, and be created with aImageView
that is compatible with the attachment referenced by the subpass'pInputAttachments
[InputAttachmentIndex
] in the currently boundFramebuffer
as specified by Fragment Input Attachment Compatibility - Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command
- If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment
- If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment
- If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled
- If the current
render pass instance uses a depth/stencil attachment with a
read-only layout for the stencil aspect, both front and back
writeMask
are not zero, and stencil test is enabled, all stencil ops must beSTENCIL_OP_KEEP
- If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT
dynamic state enabled thencmdSetViewport
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_SCISSOR
dynamic state enabled thencmdSetScissor
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_LINE_WIDTH
dynamic state enabled thencmdSetLineWidth
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_DEPTH_BIAS
dynamic state enabled thencmdSetDepthBias
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_BLEND_CONSTANTS
dynamic state enabled thencmdSetBlendConstants
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_DEPTH_BOUNDS
dynamic state enabled thencmdSetDepthBounds
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_STENCIL_COMPARE_MASK
dynamic state enabled thencmdSetStencilCompareMask
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_STENCIL_WRITE_MASK
dynamic state enabled thencmdSetStencilWriteMask
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_STENCIL_REFERENCE
dynamic state enabled thencmdSetStencilReference
must have been called in the current command buffer prior to this drawing command -
If the draw is recorded in a render pass instance with multiview
enabled, the maximum instance index must be less than or equal to
PhysicalDeviceMultiviewProperties
::maxMultiviewInstanceIndex
-
If the bound graphics pipeline was created with
PipelineSampleLocationsStateCreateInfoEXT
::sampleLocationsEnable
set toTRUE
and the current subpass has a depth/stencil attachment, then that attachment must have been created with theIMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
bit set - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT
dynamic state enabled thencmdSetSampleLocationsEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_CULL_MODE
dynamic state enabled thencmdSetCullMode
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_FRONT_FACE
dynamic state enabled thencmdSetFrontFace
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_PRIMITIVE_TOPOLOGY
dynamic state enabled thencmdSetPrimitiveTopology
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_DEPTH_TEST_ENABLE
dynamic state enabled thencmdSetDepthTestEnable
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_DEPTH_WRITE_ENABLE
dynamic state enabled thencmdSetDepthWriteEnable
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_DEPTH_COMPARE_OP
dynamic state enabled thencmdSetDepthCompareOp
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE
dynamic state enabled thencmdSetDepthBoundsTestEnable
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_STENCIL_TEST_ENABLE
dynamic state enabled thencmdSetStencilTestEnable
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_STENCIL_OP
dynamic state enabled thencmdSetStencilOp
must have been called in the current command buffer prior to this drawing command - If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT
dynamic state enabled, but not theDYNAMIC_STATE_SCISSOR_WITH_COUNT
dynamic state enabled, thencmdSetViewportWithCount
must have been called in the current command buffer prior to this drawing command, and theviewportCount
parameter ofcmdSetViewportWithCount
must match thePipelineViewportStateCreateInfo
::scissorCount
of the pipeline - If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_SCISSOR_WITH_COUNT
dynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_WITH_COUNT
dynamic state enabled, thencmdSetScissorWithCount
must have been called in the current command buffer prior to this drawing command, and thescissorCount
parameter ofcmdSetScissorWithCount
must match thePipelineViewportStateCreateInfo
::viewportCount
of the pipeline - If the
bound graphics pipeline state was created with both the
DYNAMIC_STATE_SCISSOR_WITH_COUNT
andDYNAMIC_STATE_VIEWPORT_WITH_COUNT
dynamic states enabled then bothcmdSetViewportWithCount
andcmdSetScissorWithCount
must have been called in the current command buffer prior to this drawing command, and theviewportCount
parameter ofcmdSetViewportWithCount
must match thescissorCount
parameter ofcmdSetScissorWithCount
- If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT
dynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_W_SCALING_NV
dynamic state enabled, then the bound graphics pipeline must have been created withPipelineViewportWScalingStateCreateInfoNV
::viewportCount
greater or equal to theviewportCount
parameter in the last call tocmdSetViewportWithCount
- If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT
andDYNAMIC_STATE_VIEWPORT_W_SCALING_NV
dynamic states enabled then theviewportCount
parameter in the last call tocmdSetViewportWScalingNV
must be greater than or equal to theviewportCount
parameter in the last call tocmdSetViewportWithCount
- If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT
dynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV
dynamic state enabled, then the bound graphics pipeline must have been created withPipelineViewportShadingRateImageStateCreateInfoNV
::viewportCount
greater or equal to theviewportCount
parameter in the last call tocmdSetViewportWithCount
- If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT
andDYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV
dynamic states enabled then theviewportCount
parameter in the last call tocmdSetViewportShadingRatePaletteNV
must be greater than or equal to theviewportCount
parameter in the last call tocmdSetViewportWithCount
-
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT
dynamic state enabled and aPipelineViewportSwizzleStateCreateInfoNV
structure chained fromPipelineViewportStateCreateInfo
, then the bound graphics pipeline must have been created withPipelineViewportSwizzleStateCreateInfoNV
::viewportCount
greater or equal to theviewportCount
parameter in the last call tocmdSetViewportWithCount
-
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT
dynamic state enabled and aPipelineViewportExclusiveScissorStateCreateInfoNV
structure chained fromPipelineViewportStateCreateInfo
, then the bound graphics pipeline must have been created withPipelineViewportExclusiveScissorStateCreateInfoNV
::exclusiveScissorCount
greater or equal to theviewportCount
parameter in the last call tocmdSetViewportWithCount
- If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE
dynamic state enabled thencmdSetRasterizerDiscardEnable
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_DEPTH_BIAS_ENABLE
dynamic state enabled thencmdSetDepthBiasEnable
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_LOGIC_OP_EXT
dynamic state enabled thencmdSetLogicOpEXT
must have been called in the current command buffer prior to this drawing command and thelogicOp
must be a validLogicOp
value -
If the
primitiveFragmentShadingRateWithMultipleViewports
limit is not supported, the bound graphics pipeline was created with
the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT
dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHR
built-in, thencmdSetViewportWithCount
must have been called in the current command buffer prior to this drawing command, and theviewportCount
parameter ofcmdSetViewportWithCount
must be1
- If
rasterization is not disabled in the bound graphics pipeline, then
for each color attachment in the subpass, if the corresponding image
view’s
format features
do not contain
FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT
, then theblendEnable
member of the corresponding element of thepAttachments
member ofpColorBlendState
must beFALSE
-
If rasterization is not disabled in the bound graphics pipeline, and
none of the
VK_AMD_mixed_attachment_samples
extension, theVK_NV_framebuffer_mixed_samples
extension, or the multisampledRenderToSingleSampled feature are enabled, thenPipelineMultisampleStateCreateInfo
::rasterizationSamples
must be the same as the current subpass color and/or depth/stencil attachments - If the
current render pass instance was begun with
cmdBeginRendering
, theimageView
member ofpDepthAttachment
is notNULL_HANDLE
, and thelayout
member ofpDepthAttachment
isIMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
, this command must not write any values to the depth attachment - If the
current render pass instance was begun with
cmdBeginRendering
, theimageView
member ofpStencilAttachment
is notNULL_HANDLE
, and thelayout
member ofpStencilAttachment
isIMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
, this command must not write any values to the stencil attachment - If the
current render pass instance was begun with
cmdBeginRendering
, theimageView
member ofpDepthAttachment
is notNULL_HANDLE
, and thelayout
member ofpDepthAttachment
isIMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
, this command must not write any values to the depth attachment - If the
current render pass instance was begun with
cmdBeginRendering
, theimageView
member ofpStencilAttachment
is notNULL_HANDLE
, and thelayout
member ofpStencilAttachment
isIMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
, this command must not write any values to the stencil attachment - If the
current render pass instance was begun with
cmdBeginRendering
, theimageView
member ofpDepthAttachment
is notNULL_HANDLE
, and thelayout
member ofpDepthAttachment
isIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
, this command must not write any values to the depth attachment - If the
current render pass instance was begun with
cmdBeginRendering
, theimageView
member ofpStencilAttachment
is notNULL_HANDLE
, and thelayout
member ofpStencilAttachment
isIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
, this command must not write any values to the stencil attachment - If the current
render pass instance was begun with
cmdBeginRendering
, the currently bound graphics pipeline must have been created with aPipelineRenderingCreateInfo
::viewMask
equal toRenderingInfo
::viewMask
- If
the current render pass instance was begun with
cmdBeginRendering
, the currently bound graphics pipeline must have been created with aPipelineRenderingCreateInfo
::colorAttachmentCount
equal toRenderingInfo
::colorAttachmentCount
- If
the current render pass instance was begun with
cmdBeginRendering
andRenderingInfo
::colorAttachmentCount
greater than0
, then each element of theRenderingInfo
::pColorAttachments
array with aimageView
not equal toNULL_HANDLE
must have been created with aFormat
equal to the corresponding element ofPipelineRenderingCreateInfo
::pColorAttachmentFormats
used to create the currently bound graphics pipeline - If
the current render pass instance was begun with
cmdBeginRendering
andRenderingInfo
::colorAttachmentCount
greater than0
, then each element of theRenderingInfo
::pColorAttachments
array with aimageView
equal toNULL_HANDLE
must have the corresponding element ofPipelineRenderingCreateInfo
::pColorAttachmentFormats
used to create the currently bound pipeline equal toFORMAT_UNDEFINED
- If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT
dynamic state enabled thencmdSetColorWriteEnableEXT
must have been called in the current command buffer prior to this drawing command - If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT
dynamic state enabled then theattachmentCount
parameter ofcmdSetColorWriteEnableEXT
must be greater than or equal to thePipelineColorBlendStateCreateInfo
::attachmentCount
of the currently bound graphics pipeline - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_DISCARD_RECTANGLE_EXT
dynamic state enabled thencmdSetDiscardRectangleEXT
must have been called in the current command buffer prior to this drawing command for each discard rectangle inPipelineDiscardRectangleStateCreateInfoEXT
::discardRectangleCount
- If the
current render pass instance was begun with
cmdBeginRendering
andRenderingInfo
::pDepthAttachment->imageView
was notNULL_HANDLE
, the value ofPipelineRenderingCreateInfo
::depthAttachmentFormat
used to create the currently bound graphics pipeline must be equal to theFormat
used to createRenderingInfo
::pDepthAttachment->imageView
- If the
current render pass instance was begun with
cmdBeginRendering
andRenderingInfo
::pDepthAttachment->imageView
wasNULL_HANDLE
, the value ofPipelineRenderingCreateInfo
::depthAttachmentFormat
used to create the currently bound graphics pipeline must be equal toFORMAT_UNDEFINED
- If
the current render pass instance was begun with
cmdBeginRendering
andRenderingInfo
::pStencilAttachment->imageView
was notNULL_HANDLE
, the value ofPipelineRenderingCreateInfo
::stencilAttachmentFormat
used to create the currently bound graphics pipeline must be equal to theFormat
used to createRenderingInfo
::pStencilAttachment->imageView
- If
the current render pass instance was begun with
cmdBeginRendering
andRenderingInfo
::pStencilAttachment->imageView
wasNULL_HANDLE
, the value ofPipelineRenderingCreateInfo
::stencilAttachmentFormat
used to create the currently bound graphics pipeline must be equal toFORMAT_UNDEFINED
- If the
current render pass instance was begun with
cmdBeginRendering
andRenderingFragmentShadingRateAttachmentInfoKHR
::imageView
was notNULL_HANDLE
, the currently bound graphics pipeline must have been created withPIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
- If the
current render pass instance was begun with
cmdBeginRendering
andRenderingFragmentDensityMapAttachmentInfoEXT
::imageView
was notNULL_HANDLE
, the currently bound graphics pipeline must have been created withPIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT
- If
the currently bound pipeline was created with a
AttachmentSampleCountInfoAMD
orAttachmentSampleCountInfoNV
structure, and the current render pass instance was begun withcmdBeginRendering
with aRenderingInfo
::colorAttachmentCount
parameter greater than0
, then each element of theRenderingInfo
::pColorAttachments
array with aimageView
not equal toNULL_HANDLE
must have been created with a sample count equal to the corresponding element of thepColorAttachmentSamples
member ofAttachmentSampleCountInfoAMD
orAttachmentSampleCountInfoNV
used to create the currently bound graphics pipeline - If the
current render pass instance was begun with
cmdBeginRendering
, the currently bound pipeline was created with aAttachmentSampleCountInfoAMD
orAttachmentSampleCountInfoNV
structure, andRenderingInfo
::pDepthAttachment->imageView
was notNULL_HANDLE
, the value of thedepthStencilAttachmentSamples
member ofAttachmentSampleCountInfoAMD
orAttachmentSampleCountInfoNV
used to create the currently bound graphics pipeline must be equal to the sample count used to createRenderingInfo
::pDepthAttachment->imageView
- If
the current render pass instance was begun with
cmdBeginRendering
, the currently bound pipeline was created with aAttachmentSampleCountInfoAMD
orAttachmentSampleCountInfoNV
structure, andRenderingInfo
::pStencilAttachment->imageView
was notNULL_HANDLE
, the value of thedepthStencilAttachmentSamples
member ofAttachmentSampleCountInfoAMD
orAttachmentSampleCountInfoNV
used to create the currently bound graphics pipeline must be equal to the sample count used to createRenderingInfo
::pStencilAttachment->imageView
-
If the currently bound pipeline was created without a
AttachmentSampleCountInfoAMD
orAttachmentSampleCountInfoNV
structure, and the multisampledRenderToSingleSampled feature is not enabled, and the current render pass instance was begun withcmdBeginRendering
with aRenderingInfo
::colorAttachmentCount
parameter greater than0
, then each element of theRenderingInfo
::pColorAttachments
array with aimageView
not equal toNULL_HANDLE
must have been created with a sample count equal to the value ofPipelineMultisampleStateCreateInfo
::rasterizationSamples
used to create the currently bound graphics pipeline -
If the current render pass instance was begun with
cmdBeginRendering
, the currently bound pipeline was created without aAttachmentSampleCountInfoAMD
orAttachmentSampleCountInfoNV
structure, and the multisampledRenderToSingleSampled feature is not enabled, andRenderingInfo
::pDepthAttachment->imageView
was notNULL_HANDLE
, the value ofPipelineMultisampleStateCreateInfo
::rasterizationSamples
used to create the currently bound graphics pipeline must be equal to the sample count used to createRenderingInfo
::pDepthAttachment->imageView
-
If the current render pass instance was begun with
cmdBeginRendering
, the currently bound pipeline was created without aAttachmentSampleCountInfoAMD
orAttachmentSampleCountInfoNV
structure, and the multisampledRenderToSingleSampled feature is not enabled, andRenderingInfo
::pStencilAttachment->imageView
was notNULL_HANDLE
, the value ofPipelineMultisampleStateCreateInfo
::rasterizationSamples
used to create the currently bound graphics pipeline must be equal to the sample count used to createRenderingInfo
::pStencilAttachment->imageView
- If the
current render pass instance was begun with
cmdBeginRendering
, the currently bound pipeline must have been created with aGraphicsPipelineCreateInfo
::renderPass
equal toNULL_HANDLE
-
If the
primitivesGeneratedQueryWithRasterizerDiscard
feature is not enabled and the
QUERY_TYPE_PRIMITIVES_GENERATED_EXT
query is active, rasterization discard must not be enabled -
If the
primitivesGeneratedQueryWithNonZeroStreams
feature is not enabled and the
QUERY_TYPE_PRIMITIVES_GENERATED_EXT
query is active, the bound graphics pipeline must not have been created with a non-zero value inPipelineRasterizationStateStreamCreateInfoEXT
::rasterizationStream
- If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT
dynamic state enabled thencmdSetTessellationDomainOriginEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT
dynamic state enabled thencmdSetDepthClampEnableEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_POLYGON_MODE_EXT
dynamic state enabled thencmdSetPolygonModeEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT
dynamic state enabled thencmdSetRasterizationSamplesEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_SAMPLE_MASK_EXT
dynamic state enabled thencmdSetSampleMaskEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT
dynamic state enabled thencmdSetAlphaToCoverageEnableEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT
dynamic state enabled thencmdSetAlphaToOneEnableEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT
dynamic state enabled thencmdSetLogicOpEnableEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT
dynamic state enabled thencmdSetColorBlendEnableEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT
dynamic state enabled thencmdSetColorBlendEquationEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_WRITE_MASK_EXT
dynamic state enabled thencmdSetColorWriteMaskEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_RASTERIZATION_STREAM_EXT
dynamic state enabled thencmdSetRasterizationStreamEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT
dynamic state enabled thencmdSetConservativeRasterizationModeEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT
dynamic state enabled thencmdSetExtraPrimitiveOverestimationSizeEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT
dynamic state enabled thencmdSetDepthClipEnableEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT
dynamic state enabled thencmdSetSampleLocationsEnableEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT
dynamic state enabled thencmdSetColorBlendAdvancedEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT
dynamic state enabled thencmdSetProvokingVertexModeEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT
dynamic state enabled thencmdSetLineRasterizationModeEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT
dynamic state enabled thencmdSetLineStippleEnableEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_LINE_STIPPLE_EXT
dynamic state enabled thencmdSetLineStippleEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT
dynamic state enabled thencmdSetDepthClipNegativeOneToOneEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV
dynamic state enabled thencmdSetViewportWScalingEnableNV
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV
dynamic state enabled thencmdSetViewportSwizzleNV
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV
dynamic state enabled thencmdSetCoverageToColorEnableNV
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV
dynamic state enabled thencmdSetCoverageToColorLocationNV
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV
dynamic state enabled thencmdSetCoverageModulationModeNV
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV
dynamic state enabled thencmdSetCoverageModulationTableEnableNV
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV
dynamic state enabled thencmdSetCoverageModulationTableNV
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV
dynamic state enabled thencmdSetShadingRateImageEnableNV
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV
dynamic state enabled thencmdSetRepresentativeFragmentTestEnableNV
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV
dynamic state enabled thencmdSetCoverageReductionModeNV
must have been called in the current command buffer prior to this drawing command - If
the bound graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT
state enabled and the last call tocmdSetColorBlendEnableEXT
setpColorBlendEnables
for any attachment toTRUE
, then for those attachments in the subpass the corresponding image view’s format features must containFORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT
- If
the bound graphics pipeline state was created with the
DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT
state enabled, and the current subpass does not use any color and/or depth/stencil attachments, then therasterizationSamples
in the last call tocmdSetRasterizationSamplesEXT
must follow the rules for a zero-attachment subpass - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_SAMPLE_MASK_EXT
state enabled and theDYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT
state disabled, then thesamples
parameter in the last call tocmdSetSampleMaskEXT
must be greater or equal to thePipelineMultisampleStateCreateInfo
::rasterizationSamples
parameter used to create the bound graphics pipeline - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_SAMPLE_MASK_EXT
state andDYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT
states enabled, then thesamples
parameter in the last call tocmdSetSampleMaskEXT
must be greater or equal to therasterizationSamples
parameter in the last call tocmdSetRasterizationSamplesEXT
-
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT
state enabled, and none of theVK_AMD_mixed_attachment_samples
extension,VK_NV_framebuffer_mixed_samples
extension, or the multisampledRenderToSingleSampled feature is enabled, then therasterizationSamples
in the last call tocmdSetRasterizationSamplesEXT
must be the same as the current subpass color and/or depth/stencil attachments - If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT
dynamic state enabled thencmdSetColorBlendEnableEXT
must have been called in the current command buffer prior to this drawing command, and the attachments specified by thefirstAttachment
andattachmentCount
parameters ofcmdSetColorBlendEnableEXT
calls must specify an enable for all active color attachments in the current subpass - If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT
dynamic state enabled thencmdSetColorBlendEquationEXT
must have been called in the current command buffer prior to this drawing command, and the attachments specified by thefirstAttachment
andattachmentCount
parameters ofcmdSetColorBlendEquationEXT
calls must specify the blend equations for all active color attachments in the current subpass where blending is enabled - If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_WRITE_MASK_EXT
dynamic state enabled thencmdSetColorWriteMaskEXT
must have been called in the current command buffer prior to this drawing command, and the attachments specified by thefirstAttachment
andattachmentCount
parameters ofcmdSetColorWriteMaskEXT
calls must specify the color write mask for all active color attachments in the current subpass - If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT
dynamic state enabled thencmdSetColorBlendAdvancedEXT
must have been called in the current command buffer prior to this drawing command, and the attachments specified by thefirstAttachment
andattachmentCount
parameters ofcmdSetColorBlendAdvancedEXT
calls must specify the advanced blend equations for all active color attachments in the current subpass where blending is enabled -
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT
andDYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT
dynamic states enabled and the last calls tocmdSetColorBlendEnableEXT
andcmdSetColorBlendAdvancedEXT
have enabled advanced blending, then the number of active color attachments in the current subpass must not exceed advancedBlendMaxColorAttachments -
If the
primitivesGeneratedQueryWithNonZeroStreams
feature is not enabled and the
QUERY_TYPE_PRIMITIVES_GENERATED_EXT
query is active, and the bound graphics pipeline was created withDYNAMIC_STATE_RASTERIZATION_STREAM_EXT
state enabled, the last call tocmdSetRasterizationStreamEXT
must have set therasterizationStream
to zero -
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT
state enabled and theDYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT
state disabled, then thesampleLocationsPerPixel
member ofpSampleLocationsInfo
in the last call tocmdSetSampleLocationsEXT
must equal therasterizationSamples
member of thePipelineMultisampleStateCreateInfo
structure the bound graphics pipeline has been created with -
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT
state enabled and theDYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT
state enabled, then thesampleLocationsPerPixel
member ofpSampleLocationsInfo
in the last call tocmdSetSampleLocationsEXT
must equal therasterizationSamples
parameter of the last call tocmdSetRasterizationSamplesEXT
-
If the bound graphics pipeline was created with the
DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT
state enabled, andsampleLocationsEnable
wasTRUE
in the last call tocmdSetSampleLocationsEnableEXT
, and the current subpass has a depth/stencil attachment, then that attachment must have been created with theIMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
bit set -
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT
state enabled and theDYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT
state enabled, and ifsampleLocationsEnable
wasTRUE
in the last call tocmdSetSampleLocationsEnableEXT
, then thesampleLocationsInfo.sampleLocationGridSize.width
in the last call tocmdSetSampleLocationsEXT
must evenly divideMultisamplePropertiesEXT
::sampleLocationGridSize.width
as returned bygetPhysicalDeviceMultisamplePropertiesEXT
with asamples
parameter equalingrasterizationSamples
-
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT
state enabled and theDYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT
state enabled, and ifsampleLocationsEnable
wasTRUE
in the last call tocmdSetSampleLocationsEnableEXT
, then thesampleLocationsInfo.sampleLocationGridSize.height
in the last call tocmdSetSampleLocationsEXT
must evenly divideMultisamplePropertiesEXT
::sampleLocationGridSize.height
as returned bygetPhysicalDeviceMultisamplePropertiesEXT
with asamples
parameter equalingrasterizationSamples
-
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT
state enabled, and ifsampleLocationsEnable
wasTRUE
in the last call tocmdSetSampleLocationsEnableEXT
, the fragment shader code must not statically use the extended instructionInterpolateAtSample
-
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV
state enabled and the last call tocmdSetCoverageModulationTableEnableNV
setcoverageModulationTableEnable
toTRUE
, then thecoverageModulationTableCount
parameter in the last call tocmdSetCoverageModulationTableNV
must equal the currentrasterizationSamples
divided by the number of color samples in the current subpass - If
the
VK_NV_framebuffer_mixed_samples
extension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the currently bound pipeline state, then the currentrasterizationSamples
must be the same as the sample count of the depth/stencil attachment -
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV
state enabled and the last call tocmdSetCoverageToColorEnableNV
set thecoverageToColorEnable
toTRUE
, then the current subpass must have a color attachment at the location selected by the last call tocmdSetCoverageToColorLocationNV
coverageToColorLocation
, with aFormat
ofFORMAT_R8_UINT
,FORMAT_R8_SINT
,FORMAT_R16_UINT
,FORMAT_R16_SINT
,FORMAT_R32_UINT
, orFORMAT_R32_SINT
-
If this
VK_NV_coverage_reduction_mode
extension is enabled, the bound graphics pipeline state was created with theDYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV
andDYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT
states enabled, the current coverage reduction modecoverageReductionMode
, then the currentrasterizationSamples
, and the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned bygetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV
- If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT
dynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_SWIZZLE_NV
dynamic state enabled, then the bound graphics pipeline must have been created withPipelineViewportSwizzleStateCreateInfoNV
::viewportCount
greater or equal to theviewportCount
parameter in the last call tocmdSetViewportWithCount
- If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT
andDYNAMIC_STATE_VIEWPORT_SWIZZLE_NV
dynamic states enabled then theviewportCount
parameter in the last call tocmdSetViewportSwizzleNV
must be greater than or equal to theviewportCount
parameter in the last call tocmdSetViewportWithCount
- If
the
VK_NV_framebuffer_mixed_samples
extension is enabled, and if the current subpass has any color attachments andrasterizationSamples
of the last call tocmdSetRasterizationSamplesEXT
is greater than the number of color samples, then the pipelinesampleShadingEnable
must beFALSE
- If
the bound graphics pipeline state was created with the
DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT
orDYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT
dynamic states enabled, and if the currentstippledLineEnable
state isTRUE
and the currentlineRasterizationMode
state isLINE_RASTERIZATION_MODE_RECTANGULAR_EXT
, then the stippledRectangularLines feature must be enabled - If
the bound graphics pipeline state was created with the
DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT
orDYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT
dynamic states enabled, and if the currentstippledLineEnable
state isTRUE
and the currentlineRasterizationMode
state isLINE_RASTERIZATION_MODE_BRESENHAM_EXT
, then the stippledBresenhamLines feature must be enabled - If
the bound graphics pipeline state was created with the
DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT
orDYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT
dynamic states enabled, and if the currentstippledLineEnable
state isTRUE
and the currentlineRasterizationMode
state isLINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT
, then the stippledSmoothLines feature must be enabled - If
the bound graphics pipeline state was created with the
DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT
orDYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT
dynamic states enabled, and if the currentstippledLineEnable
state isTRUE
and the currentlineRasterizationMode
state isLINE_RASTERIZATION_MODE_DEFAULT_EXT
, then the stippledRectangularLines feature must be enabled andPhysicalDeviceLimits
::strictLines
must be VK_TRUE -
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT
dynamic state enabled, conservativePointAndLineRasterization is not supported, and the effective primitive topology output by the last pre-rasterization shader stage is a line or point, then theconservativeRasterizationMode
set by the last call tocmdSetConservativeRasterizationModeEXT
must beCONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT
- If the currently
bound pipeline was created with the
PipelineShaderStageCreateInfo
::stage
member of an element ofGraphicsPipelineCreateInfo
::pStages
set toSHADER_STAGE_VERTEX_BIT
,SHADER_STAGE_TESSELLATION_CONTROL_BIT
,SHADER_STAGE_TESSELLATION_EVALUATION_BIT
orSHADER_STAGE_GEOMETRY_BIT
, then Mesh Shader Queries must not be active - If dynamic state
was inherited from
CommandBufferInheritanceViewportScissorInfoNV
, it must be set in the current command buffer prior to this drawing command - All vertex input
bindings accessed via vertex input variables declared in the vertex
shader entry point’s interface must have either valid or
NULL_HANDLE
buffers bound - If the
nullDescriptor
feature is not enabled, all vertex input bindings accessed via
vertex input variables declared in the vertex shader entry point’s
interface must not be
NULL_HANDLE
- For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in ???
-
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT
dynamic state enabled and the dynamicPrimitiveTopologyUnrestricted isFALSE
, then theprimitiveTopology
parameter in the last call tocmdSetPrimitiveTopology
must be of the same topology class as the pipelinePipelineInputAssemblyStateCreateInfo
::topology
state - If the bound
graphics pipeline was created with both the
DYNAMIC_STATE_VERTEX_INPUT_EXT
andDYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT
dynamic states enabled, thencmdSetVertexInputEXT
must have been called in the current command buffer prior to this draw command - If the bound
graphics pipeline was created with the
DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT
dynamic state enabled, but not theDYNAMIC_STATE_VERTEX_INPUT_EXT
dynamic state enabled, thencmdBindVertexBuffers2EXT
must have been called in the current command buffer prior to this draw command, and thepStrides
parameter ofcmdBindVertexBuffers2EXT
must not beNULL
- If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_VERTEX_INPUT_EXT
dynamic state enabled, thencmdSetVertexInputEXT
must have been called in the current command buffer prior to this draw command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT
dynamic state enabled thencmdSetPatchControlPointsEXT
must have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE
dynamic state enabled thencmdSetPrimitiveRestartEnable
must have been called in the current command buffer prior to this drawing command - The bound
graphics pipeline must not have been created with the
PipelineShaderStageCreateInfo
::stage
member of an element ofGraphicsPipelineCreateInfo
::pStages
set toSHADER_STAGE_TASK_BIT_EXT
orSHADER_STAGE_MESH_BIT_EXT
-
commandBuffer
must not be a protected command buffer - If
isPreprocessed
isTRUE
thencmdPreprocessGeneratedCommandsNV
must have already been executed on the device, using the samepGeneratedCommandsInfo
content as well as the content of the input buffers it references (all exceptGeneratedCommandsInfoNV
::preprocessBuffer
). FurthermorepGeneratedCommandsInfo
`sindirectCommandsLayout
must have been created with theINDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV
bit set -
GeneratedCommandsInfoNV
::pipeline
must match the current bound pipeline atGeneratedCommandsInfoNV
::pipelineBindPoint
- Transform feedback must not be active
- The ::deviceGeneratedCommands feature must be enabled
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pGeneratedCommandsInfo
must be a valid pointer to a validGeneratedCommandsInfoNV
structure -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - This command must only be called inside of a render pass instance
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
'
Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
---|---|---|---|---|
Primary Secondary | Inside | Outside | Graphics Compute | Action Indirection |
See Also
VK_NV_device_generated_commands,
Bool32
,
CommandBuffer
, GeneratedCommandsInfoNV
cmdPreprocessGeneratedCommandsNV Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> GeneratedCommandsInfoNV |
|
-> io () |
vkCmdPreprocessGeneratedCommandsNV - Performs preprocessing for generated commands
Valid Usage
-
pGeneratedCommandsInfo
`sindirectCommandsLayout
must have been created with theINDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV
bit set - The ::deviceGeneratedCommands feature must be enabled
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pGeneratedCommandsInfo
must be a valid pointer to a validGeneratedCommandsInfoNV
structure -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - This command must only be called outside of a render pass instance
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
'
Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
---|---|---|---|---|
Primary Secondary | Outside | Outside | Graphics Compute | Action |
See Also
VK_NV_device_generated_commands,
CommandBuffer
, GeneratedCommandsInfoNV
cmdBindPipelineShaderGroupNV Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> PipelineBindPoint |
|
-> Pipeline |
|
-> ("groupIndex" ::: Word32) |
|
-> io () |
vkCmdBindPipelineShaderGroupNV - Bind a pipeline object
Valid Usage
-
groupIndex
must be0
or less than the effectiveGraphicsPipelineShaderGroupsCreateInfoNV
::groupCount
including the referenced pipelines
- The
pipelineBindPoint
must bePIPELINE_BIND_POINT_GRAPHICS
- The same
restrictions as
cmdBindPipeline
apply as if the bound pipeline was created only with the Shader Group from thegroupIndex
information - The deviceGeneratedCommands feature must be enabled
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pipelineBindPoint
must be a validPipelineBindPoint
value -
pipeline
must be a validPipeline
handle -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - This command must only be called outside of a video coding scope
- Both of
commandBuffer
, andpipeline
must have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
'
Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
---|---|---|---|---|
Primary Secondary | Both | Outside | Graphics Compute | State |
See Also
VK_NV_device_generated_commands,
CommandBuffer
, Pipeline
,
PipelineBindPoint
getGeneratedCommandsMemoryRequirementsNV Source #
:: forall a io. (Extendss MemoryRequirements2 a, PokeChain a, PeekChain a, MonadIO io) | |
=> Device |
|
-> GeneratedCommandsMemoryRequirementsInfoNV |
|
-> io (MemoryRequirements2 a) |
vkGetGeneratedCommandsMemoryRequirementsNV - Retrieve the buffer allocation requirements for generated commands
Valid Usage
- The ::deviceGeneratedCommands feature must be enabled
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pInfo
must be a valid pointer to a validGeneratedCommandsMemoryRequirementsInfoNV
structure -
pMemoryRequirements
must be a valid pointer to aMemoryRequirements2
structure
See Also
VK_NV_device_generated_commands,
Device
,
GeneratedCommandsMemoryRequirementsInfoNV
,
MemoryRequirements2
createIndirectCommandsLayoutNV Source #
:: forall io. MonadIO io | |
=> Device |
|
-> IndirectCommandsLayoutCreateInfoNV |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io IndirectCommandsLayoutNV |
vkCreateIndirectCommandsLayoutNV - Create an indirect command layout object
Valid Usage
- The ::deviceGeneratedCommands feature must be enabled
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pCreateInfo
must be a valid pointer to a validIndirectCommandsLayoutCreateInfoNV
structure - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure -
pIndirectCommandsLayout
must be a valid pointer to aIndirectCommandsLayoutNV
handle
Return Codes
See Also
VK_NV_device_generated_commands,
AllocationCallbacks
,
Device
, IndirectCommandsLayoutCreateInfoNV
,
IndirectCommandsLayoutNV
withIndirectCommandsLayoutNV :: forall io r. MonadIO io => Device -> IndirectCommandsLayoutCreateInfoNV -> Maybe AllocationCallbacks -> (io IndirectCommandsLayoutNV -> (IndirectCommandsLayoutNV -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createIndirectCommandsLayoutNV
and destroyIndirectCommandsLayoutNV
To ensure that destroyIndirectCommandsLayoutNV
is always called: pass
bracket
(or the allocate function from your
favourite resource management library) as the last argument.
To just extract the pair pass (,)
as the last argument.
destroyIndirectCommandsLayoutNV Source #
:: forall io. MonadIO io | |
=> Device |
|
-> IndirectCommandsLayoutNV |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io () |
vkDestroyIndirectCommandsLayoutNV - Destroy an indirect commands layout
Valid Usage
-
If
AllocationCallbacks
were provided whenindirectCommandsLayout
was created, a compatible set of callbacks must be provided here -
If no
AllocationCallbacks
were provided whenindirectCommandsLayout
was created,pAllocator
must beNULL
- The ::deviceGeneratedCommands feature must be enabled
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
If
indirectCommandsLayout
is notNULL_HANDLE
,indirectCommandsLayout
must be a validIndirectCommandsLayoutNV
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure -
If
indirectCommandsLayout
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
indirectCommandsLayout
must be externally synchronized
See Also
VK_NV_device_generated_commands,
AllocationCallbacks
,
Device
,
IndirectCommandsLayoutNV
data PhysicalDeviceDeviceGeneratedCommandsFeaturesNV Source #
VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV - Structure describing the device-generated commands features that can be supported by an implementation
Members
This structure describes the following feature:
Description
If the PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
structure is
included in the pNext
chain of the
PhysicalDeviceFeatures2
structure passed to
getPhysicalDeviceFeatures2
,
it is filled in to indicate whether each corresponding feature is
supported. PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
can also
be used in the pNext
chain of DeviceCreateInfo
to selectively enable these features.
Valid Usage (Implicit)
See Also
PhysicalDeviceDeviceGeneratedCommandsFeaturesNV | |
|
Instances
data PhysicalDeviceDeviceGeneratedCommandsPropertiesNV Source #
VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV - Structure describing push descriptor limits that can be supported by an implementation
Description
If the PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
structure is
included in the pNext
chain of the
PhysicalDeviceProperties2
structure passed to
getPhysicalDeviceProperties2
,
it is filled in with each corresponding implementation-dependent
property.
Valid Usage (Implicit)
See Also
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV | |
|
Instances
data GraphicsShaderGroupCreateInfoNV Source #
VkGraphicsShaderGroupCreateInfoNV - Structure specifying override parameters for each shader group
Valid Usage
- For
stageCount
, the same restrictions as inGraphicsPipelineCreateInfo
::stageCount
apply
- For
pStages
, the same restrictions as inGraphicsPipelineCreateInfo
::pStages
apply - For
pVertexInputState
, the same restrictions as inGraphicsPipelineCreateInfo
::pVertexInputState
apply -
For
pTessellationState
, the same restrictions as inGraphicsPipelineCreateInfo
::pTessellationState
apply
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV
-
pNext
must beNULL
-
pStages
must be a valid pointer to an array ofstageCount
validPipelineShaderStageCreateInfo
structures -
stageCount
must be greater than0
See Also
VK_NV_device_generated_commands,
GraphicsPipelineShaderGroupsCreateInfoNV
,
PipelineShaderStageCreateInfo
,
PipelineTessellationStateCreateInfo
,
PipelineVertexInputStateCreateInfo
,
StructureType
GraphicsShaderGroupCreateInfoNV | |
|
Instances
data GraphicsPipelineShaderGroupsCreateInfoNV Source #
VkGraphicsPipelineShaderGroupsCreateInfoNV - Structure specifying parameters of a newly created multi shader group pipeline
Description
When referencing shader groups by index, groups defined in the
referenced pipelines are treated as if they were defined as additional
entries in pGroups
. They are appended in the order they appear in the
pPipelines
array and in the pGroups
array when those pipelines were
defined.
The application must maintain the lifetime of all such referenced pipelines based on the pipelines that make use of them.
Valid Usage
-
groupCount
must be at least1
and as maximumPhysicalDeviceDeviceGeneratedCommandsPropertiesNV
::maxGraphicsShaderGroupCount
-
The sum of
groupCount
including those groups added from referencedpPipelines
must also be as maximumPhysicalDeviceDeviceGeneratedCommandsPropertiesNV
::maxGraphicsShaderGroupCount
- The
state of the first element of
pGroups
must match its equivalent within the parent’sGraphicsPipelineCreateInfo
- Each
element of
pGroups
must in combination with the rest of the pipeline state yield a valid state configuration - All
elements of
pGroups
must use the same shader stage combinations unless any mesh shader stage is used, then either combination of task and mesh or just mesh shader is valid - Mesh
and regular primitive shading stages cannot be mixed across
pGroups
-
Each element of
pPipelines
must have been created with identical state to the pipeline currently created except the state that can be overridden byGraphicsShaderGroupCreateInfoNV
- The deviceGeneratedCommands feature must be enabled
Valid Usage (Implicit)
-
If
groupCount
is not0
,pGroups
must be a valid pointer to an array ofgroupCount
validGraphicsShaderGroupCreateInfoNV
structures -
If
pipelineCount
is not0
,pPipelines
must be a valid pointer to an array ofpipelineCount
validPipeline
handles
See Also
VK_NV_device_generated_commands,
GraphicsShaderGroupCreateInfoNV
, Pipeline
,
StructureType
GraphicsPipelineShaderGroupsCreateInfoNV | |
|
Instances
data BindShaderGroupIndirectCommandNV Source #
VkBindShaderGroupIndirectCommandNV - Structure specifying input data for a single shader group command token
Valid Usage
- The current
bound graphics pipeline, as well as the pipelines it may reference,
must have been created with
PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV
- The
index
must be within range of the accessible shader groups of the current bound graphics pipeline. SeecmdBindPipelineShaderGroupNV
for further details
See Also
Instances
data BindIndexBufferIndirectCommandNV Source #
VkBindIndexBufferIndirectCommandNV - Structure specifying input data for a single index buffer command token
Valid Usage
- The buffer’s
usage flag from which the address was acquired must have the
BUFFER_USAGE_INDEX_BUFFER_BIT
bit set
- The
bufferAddress
must be aligned to theindexType
used - Each element of
the buffer from which the address was acquired and that is
non-sparse must be bound completely and contiguously to a single
DeviceMemory
object
Valid Usage (Implicit)
-
indexType
must be a validIndexType
value
See Also
BindIndexBufferIndirectCommandNV | |
|
Instances
data BindVertexBufferIndirectCommandNV Source #
VkBindVertexBufferIndirectCommandNV - Structure specifying input data for a single vertex buffer command token
Valid Usage
- The buffer’s
usage flag from which the address was acquired must have the
BUFFER_USAGE_VERTEX_BUFFER_BIT
bit set
- Each element
of the buffer from which the address was acquired and that is
non-sparse must be bound completely and contiguously to a single
DeviceMemory
object
See Also
BindVertexBufferIndirectCommandNV | |
|
Instances
data SetStateFlagsIndirectCommandNV Source #
VkSetStateFlagsIndirectCommandNV - Structure specifying input data for a single state flag command token
See Also
SetStateFlagsIndirectCommandNV | |
|
Instances
data IndirectCommandsStreamNV Source #
VkIndirectCommandsStreamNV - Structure specifying input streams for generated command tokens
Valid Usage
- The
buffer
’s usage flag must have theBUFFER_USAGE_INDIRECT_BUFFER_BIT
bit set
- The
offset
must be aligned toPhysicalDeviceDeviceGeneratedCommandsPropertiesNV
::minIndirectCommandsBufferOffsetAlignment
- If
buffer
is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object
Valid Usage (Implicit)
-
buffer
must be a validBuffer
handle
See Also
VK_NV_device_generated_commands,
Buffer
,
DeviceSize
, GeneratedCommandsInfoNV
IndirectCommandsStreamNV | |
|
Instances
data IndirectCommandsLayoutTokenNV Source #
VkIndirectCommandsLayoutTokenNV - Struct specifying the details of an indirect command layout token
Valid Usage
-
stream
must be smaller thanIndirectCommandsLayoutCreateInfoNV
::streamCount
-
offset
must be less than or equal toPhysicalDeviceDeviceGeneratedCommandsPropertiesNV
::maxIndirectCommandsTokenOffset
-
offset
must be aligned to the scalar alignment oftokenType
orminIndirectCommandsBufferOffsetAlignment
, whichever is lower - If
tokenType
isINDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV
,vertexBindingUnit
must stay within device supported limits for the appropriate commands - If
tokenType
isINDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV
,pushconstantPipelineLayout
must be valid - If
tokenType
isINDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV
,pushconstantOffset
must be a multiple of4
- If
tokenType
isINDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV
,pushconstantSize
must be a multiple of4
- If
tokenType
isINDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV
,pushconstantOffset
must be less thanPhysicalDeviceLimits
::maxPushConstantsSize
- If
tokenType
isINDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV
,pushconstantSize
must be less than or equal toPhysicalDeviceLimits
::maxPushConstantsSize
minuspushconstantOffset
- If
tokenType
isINDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV
, for each byte in the range specified bypushconstantOffset
andpushconstantSize
and for each shader stage inpushconstantShaderStageFlags
, there must be a push constant range inpushconstantPipelineLayout
that includes that byte and that stage - If
tokenType
isINDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV
, for each byte in the range specified bypushconstantOffset
andpushconstantSize
and for each push constant range that overlaps that byte,pushconstantShaderStageFlags
must include all stages in that push constant range’sPushConstantRange
::stageFlags
- If
tokenType
isINDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV
,indirectStateFlags
must not be0
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV
-
pNext
must beNULL
-
tokenType
must be a validIndirectCommandsTokenTypeNV
value -
If
pushconstantPipelineLayout
is notNULL_HANDLE
,pushconstantPipelineLayout
must be a validPipelineLayout
handle -
pushconstantShaderStageFlags
must be a valid combination ofShaderStageFlagBits
values -
indirectStateFlags
must be a valid combination ofIndirectStateFlagBitsNV
values - If
indexTypeCount
is not0
,pIndexTypes
must be a valid pointer to an array ofindexTypeCount
validIndexType
values - If
indexTypeCount
is not0
,pIndexTypeValues
must be a valid pointer to an array ofindexTypeCount
uint32_t
values
See Also
VK_NV_device_generated_commands,
Bool32
,
IndexType
,
IndirectCommandsLayoutCreateInfoNV
, IndirectCommandsTokenTypeNV
,
IndirectStateFlagsNV
, PipelineLayout
,
ShaderStageFlags
,
StructureType
IndirectCommandsLayoutTokenNV | |
|
Instances
data IndirectCommandsLayoutCreateInfoNV Source #
VkIndirectCommandsLayoutCreateInfoNV - Structure specifying the parameters of a newly created indirect commands layout object
Description
The following code illustrates some of the flags:
void cmdProcessAllSequences(cmd, pipeline, indirectCommandsLayout, pIndirectCommandsTokens, sequencesCount, indexbuffer, indexbufferOffset) { for (s = 0; s < sequencesCount; s++) { sUsed = s; if (indirectCommandsLayout.flags & VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV) { sUsed = indexbuffer.load_uint32( sUsed * sizeof(uint32_t) + indexbufferOffset); } if (indirectCommandsLayout.flags & VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV) { sUsed = incoherent_implementation_dependent_permutation[ sUsed ]; } cmdProcessSequence( cmd, pipeline, indirectCommandsLayout, pIndirectCommandsTokens, sUsed ); } }
When tokens are consumed, an offset is computed based on token offset
and stream stride. The resulting offset is required to be aligned. The
alignment for a specific token is equal to the scalar alignment of the
data type as defined in
Alignment Requirements,
or
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
::minIndirectCommandsBufferOffsetAlignment
,
whichever is lower.
Note
A minIndirectCommandsBufferOffsetAlignment
of 4 allows
DeviceAddress
to be packed as uvec2
with scalar layout instead of uint64_t
with 8 byte alignment. This
enables direct compatibility with D3D12 command signature layouts.
Valid Usage
-
The
pipelineBindPoint
must bePIPELINE_BIND_POINT_GRAPHICS
-
tokenCount
must be greater than0
and less than or equal toPhysicalDeviceDeviceGeneratedCommandsPropertiesNV
::maxIndirectCommandsTokenCount
- If
pTokens
contains an entry ofINDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV
it must be the first element of the array and there must be only a single element of such token type - If
pTokens
contains an entry ofINDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV
there must be only a single element of such token type - All state
tokens in
pTokens
must occur before any work provoking tokens (INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV
,INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV
,INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV
,INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV
) - The
content of
pTokens
must include one single work provoking token that is compatible with thepipelineBindPoint
-
streamCount
must be greater than0
and less or equal toPhysicalDeviceDeviceGeneratedCommandsPropertiesNV
::maxIndirectCommandsStreamCount
-
each element of
pStreamStrides
must be greater than `0`and less than or equal toPhysicalDeviceDeviceGeneratedCommandsPropertiesNV
::maxIndirectCommandsStreamStride
. Furthermore the alignment of each token input must be ensured
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV
-
pNext
must beNULL
-
flags
must be a valid combination ofIndirectCommandsLayoutUsageFlagBitsNV
values -
pipelineBindPoint
must be a validPipelineBindPoint
value -
pTokens
must be a valid pointer to an array oftokenCount
validIndirectCommandsLayoutTokenNV
structures -
pStreamStrides
must be a valid pointer to an array ofstreamCount
uint32_t
values -
tokenCount
must be greater than0
-
streamCount
must be greater than0
See Also
VK_NV_device_generated_commands,
IndirectCommandsLayoutTokenNV
, IndirectCommandsLayoutUsageFlagsNV
,
PipelineBindPoint
,
StructureType
,
createIndirectCommandsLayoutNV
IndirectCommandsLayoutCreateInfoNV | |
|
Instances
data GeneratedCommandsInfoNV Source #
VkGeneratedCommandsInfoNV - Structure specifying parameters for the generation of commands
Valid Usage
- If the
indirectCommandsLayout
uses a token ofINDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV
, then thepipeline
must have been created with multiple shader groups - If the
indirectCommandsLayout
uses a token ofINDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV
, then thepipeline
must have been created withPIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV
set inGraphicsPipelineCreateInfo
::flags
- If the
indirectCommandsLayout
uses a token ofINDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV
, then thepipeline
`sPipelineLayout
must match theIndirectCommandsLayoutTokenNV
::pushconstantPipelineLayout
-
streamCount
must match theindirectCommandsLayout
’sstreamCount
-
sequencesCount
must be less or equal toPhysicalDeviceDeviceGeneratedCommandsPropertiesNV
::maxIndirectSequenceCount
andGeneratedCommandsMemoryRequirementsInfoNV
::maxSequencesCount
that was used to determine thepreprocessSize
-
preprocessBuffer
must have theBUFFER_USAGE_INDIRECT_BUFFER_BIT
bit set in its usage flag -
preprocessOffset
must be aligned toPhysicalDeviceDeviceGeneratedCommandsPropertiesNV
::minIndirectCommandsBufferOffsetAlignment
- If
preprocessBuffer
is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object -
preprocessSize
must be at least equal to the memory requirement`s size returned bygetGeneratedCommandsMemoryRequirementsNV
using the matching inputs (indirectCommandsLayout
, …) as within this structure -
sequencesCountBuffer
can be set if the actual used count of sequences is sourced from the provided buffer. In that case thesequencesCount
serves as upper bound - If
sequencesCountBuffer
is notNULL_HANDLE
, its usage flag must have theBUFFER_USAGE_INDIRECT_BUFFER_BIT
bit set - If
sequencesCountBuffer
is notNULL_HANDLE
,sequencesCountOffset
must be aligned toPhysicalDeviceDeviceGeneratedCommandsPropertiesNV
::minSequencesCountBufferOffsetAlignment
- If
sequencesCountBuffer
is notNULL_HANDLE
and is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - If
indirectCommandsLayout
’sINDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV
is set,sequencesIndexBuffer
must be set otherwise it must beNULL_HANDLE
- If
sequencesIndexBuffer
is notNULL_HANDLE
, its usage flag must have theBUFFER_USAGE_INDIRECT_BUFFER_BIT
bit set - If
sequencesIndexBuffer
is notNULL_HANDLE
,sequencesIndexOffset
must be aligned toPhysicalDeviceDeviceGeneratedCommandsPropertiesNV
::minSequencesIndexBufferOffsetAlignment
- If
sequencesIndexBuffer
is notNULL_HANDLE
and is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - If the
indirectCommandsLayout
uses a token ofINDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV
, then thepipeline
must contain a shader stage using theMeshNV
Execution
Model
- If the
indirectCommandsLayout
uses a token ofINDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV
, then thepipeline
must contain a shader stage using theMeshEXT
Execution
Model
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV
-
pNext
must beNULL
-
pipelineBindPoint
must be a validPipelineBindPoint
value -
pipeline
must be a validPipeline
handle -
indirectCommandsLayout
must be a validIndirectCommandsLayoutNV
handle -
pStreams
must be a valid pointer to an array ofstreamCount
validIndirectCommandsStreamNV
structures -
preprocessBuffer
must be a validBuffer
handle - If
sequencesCountBuffer
is notNULL_HANDLE
,sequencesCountBuffer
must be a validBuffer
handle - If
sequencesIndexBuffer
is notNULL_HANDLE
,sequencesIndexBuffer
must be a validBuffer
handle -
streamCount
must be greater than0
- Each of
indirectCommandsLayout
,pipeline
,preprocessBuffer
,sequencesCountBuffer
, andsequencesIndexBuffer
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
VK_NV_device_generated_commands,
Buffer
,
DeviceSize
,
IndirectCommandsLayoutNV
,
IndirectCommandsStreamNV
, Pipeline
,
PipelineBindPoint
,
StructureType
,
cmdExecuteGeneratedCommandsNV
, cmdPreprocessGeneratedCommandsNV
GeneratedCommandsInfoNV | |
|
Instances
Show GeneratedCommandsInfoNV Source # | |
Defined in Vulkan.Extensions.VK_NV_device_generated_commands showsPrec :: Int -> GeneratedCommandsInfoNV -> ShowS # show :: GeneratedCommandsInfoNV -> String # showList :: [GeneratedCommandsInfoNV] -> ShowS # | |
FromCStruct GeneratedCommandsInfoNV Source # | |
ToCStruct GeneratedCommandsInfoNV Source # | |
Defined in Vulkan.Extensions.VK_NV_device_generated_commands withCStruct :: GeneratedCommandsInfoNV -> (Ptr GeneratedCommandsInfoNV -> IO b) -> IO b Source # pokeCStruct :: Ptr GeneratedCommandsInfoNV -> GeneratedCommandsInfoNV -> IO b -> IO b Source # withZeroCStruct :: (Ptr GeneratedCommandsInfoNV -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr GeneratedCommandsInfoNV -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero GeneratedCommandsInfoNV Source # | |
data GeneratedCommandsMemoryRequirementsInfoNV Source #
VkGeneratedCommandsMemoryRequirementsInfoNV - Structure specifying parameters for the reservation of preprocess buffer space
Valid Usage
-
maxSequencesCount
must be less or equal toPhysicalDeviceDeviceGeneratedCommandsPropertiesNV
::maxIndirectSequenceCount
Valid Usage (Implicit)
-
pNext
must beNULL
-
pipelineBindPoint
must be a validPipelineBindPoint
value -
pipeline
must be a validPipeline
handle -
indirectCommandsLayout
must be a validIndirectCommandsLayoutNV
handle - Both
of
indirectCommandsLayout
, andpipeline
must have been created, allocated, or retrieved from the sameDevice
See Also
VK_NV_device_generated_commands,
IndirectCommandsLayoutNV
,
Pipeline
,
PipelineBindPoint
,
StructureType
,
getGeneratedCommandsMemoryRequirementsNV
GeneratedCommandsMemoryRequirementsInfoNV | |
|
Instances
newtype IndirectCommandsLayoutUsageFlagBitsNV Source #
VkIndirectCommandsLayoutUsageFlagBitsNV - Bitmask specifying allowed usage of an indirect commands layout
See Also
VK_NV_device_generated_commands,
IndirectCommandsLayoutUsageFlagsNV
Instances
newtype IndirectStateFlagBitsNV Source #
VkIndirectStateFlagBitsNV - Bitmask specifying state that can be altered on the device
See Also
pattern INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV :: IndirectStateFlagBitsNV |
|
Instances
newtype IndirectCommandsTokenTypeNV Source #
VkIndirectCommandsTokenTypeNV - Enum specifying token commands
Description
'
Supported indirect command tokens
See Also
VK_NV_device_generated_commands,
IndirectCommandsLayoutTokenNV
Instances
pattern NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION :: forall a. Integral a => a Source #
type NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NV_device_generated_commands" Source #
pattern NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
newtype IndirectCommandsLayoutNV Source #
VkIndirectCommandsLayoutNV - Opaque handle to an indirect commands layout object
See Also
VK_NV_device_generated_commands,
GeneratedCommandsInfoNV
,
GeneratedCommandsMemoryRequirementsInfoNV
,
createIndirectCommandsLayoutNV
,
destroyIndirectCommandsLayoutNV