vulkan-3.6.11.1: Bindings to the Vulkan graphics API.

Synopsis

# Documentation

Arguments

 :: forall io. MonadIO io => CommandBuffer commandBuffer is the command buffer into which the command will be recorded. -> ("taskCount" ::: Word32) taskCount is the number of local workgroups to dispatch in the X dimension. Y and Z dimension are implicitly set to one. -> ("firstTask" ::: Word32) firstTask is the X component of the first workgroup ID. -> io ()

# Description

When the command is executed, a global workgroup consisting of taskCount local workgroups is assembled.

## Valid Usage

• If a Sampler created with magFilter or minFilter equal to FILTER_LINEAR and compareEnable equal to FALSE is used to sample a ImageView as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
• If a ImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
• If a ImageView is sampled with FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
• Any ImageView being sampled with FILTER_CUBIC_EXT as a result of this command must have a ImageViewType and format that supports cubic filtering, as specified by FilterCubicImageViewImageFormatPropertiesEXT::filterCubic returned by getPhysicalDeviceImageFormatProperties2
• Any ImageView being sampled with FILTER_CUBIC_EXT with a reduction mode of either SAMPLER_REDUCTION_MODE_MIN or SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a ImageViewType and format that supports cubic filtering together with minmax filtering, as specified by FilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by getPhysicalDeviceImageFormatProperties2
• Any Image created with a ImageCreateInfo::flags containing IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a SamplerAddressMode of SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
• 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 a PipelineLayout that is compatible for set n, with the PipelineLayout used to create the current Pipeline, as described in ???
• 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 a PipelineLayout that is compatible for push constants, with the PipelineLayout used to create the current Pipeline, as described in ???
• Descriptors in each bound descriptor set, specified via cmdBindDescriptorSets, must be valid if they are statically used by the Pipeline bound to the pipeline bind point used by this command
• A valid pipeline must be bound to the pipeline bind point used by this command
• If the Pipeline object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set for commandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic
• 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 a Sampler object that uses unnormalized coordinates, that sampler must not be used to sample from any Image with a ImageView of the type IMAGE_VIEW_TYPE_3D, IMAGE_VIEW_TYPE_CUBE, IMAGE_VIEW_TYPE_1D_ARRAY, IMAGE_VIEW_TYPE_2D_ARRAY or IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage
• If the Pipeline object bound to the pipeline bind point used by this command accesses a Sampler object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage
• If the Pipeline object bound to the pipeline bind point used by this command accesses a Sampler object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage
• If the robust buffer access feature is not enabled, and if the Pipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, it 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 the robust buffer access feature is not enabled, and if the Pipeline object bound to the pipeline bind point used by this command accesses a storage buffer, it 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, any resource accessed by the Pipeline object bound to the pipeline bind point used by this command must not be a protected resource
• If a ImageView is accessed using OpImageWrite as a result of this command, then the Type of the Texel operand of that instruction must have at least as many components as the image view’s format.
• If a BufferView is accessed using OpImageWrite as a result of this command, then the Type of the Texel operand of that instruction must have at least as many components as the image view’s format.
• If a ImageView with a Format that has a 64-bit channel width is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 64.
• If a ImageView with a Format that has a channel width less than 64-bit is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 32.
• If a BufferView with a Format that has a 64-bit channel width is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 64.
• If a BufferView with a Format that has a channel width less than 64-bit is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 32.
• If the sparseImageInt64Atomics feature is not enabled, Image objects created with the IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an OpTypeImage with a SampledType with a Width of 64 by this command.
• If the sparseImageInt64Atomics feature is not enabled, Buffer objects created with the BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an OpTypeImage with a SampledType with a Width of 64 by this command.
• The current render pass must be compatible with the renderPass member of the GraphicsPipelineCreateInfo structure specified when creating the Pipeline bound to PIPELINE_BIND_POINT_GRAPHICS
• The subpass index of the current render pass must be equal to the subpass member of the GraphicsPipelineCreateInfo structure specified when creating the Pipeline bound to PIPELINE_BIND_POINT_GRAPHICS
• Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
• Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this 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 to TRUE and the current subpass has a depth/stencil attachment, then that attachment must have been created with the IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, but not the DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT dynamic state enabled, then cmdSetViewportWithCountEXT must have been called in the current command buffer prior to this draw command, and the viewportCount parameter of cmdSetViewportWithCountEXT must match the PipelineViewportStateCreateInfo::scissorCount of the pipeline
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT dynamic state enabled, but not the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, then cmdSetScissorWithCountEXT must have been called in the current command buffer prior to this draw command, and the scissorCount parameter of cmdSetScissorWithCountEXT must match the PipelineViewportStateCreateInfo::viewportCount of the pipeline
• If the bound graphics pipeline state was created with both the DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT and DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic states enabled then both cmdSetViewportWithCountEXT and cmdSetScissorWithCountEXT must have been called in the current command buffer prior to this draw command, and the viewportCount parameter of cmdSetViewportWithCountEXT must match the scissorCount parameter of cmdSetScissorWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, but not the DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with PipelineViewportWScalingStateCreateInfoNV::viewportCount greater or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT and DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic states enabled then the viewportCount parameter in the last call to cmdSetViewportWScalingNV must be greater than or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, but not the DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with PipelineViewportShadingRateImageStateCreateInfoNV::viewportCount greater or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT and DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic states enabled then the viewportCount parameter in the last call to cmdSetViewportShadingRatePaletteNV must be greater than or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled and an instance of PipelineViewportSwizzleStateCreateInfoNV chained from VkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with PipelineViewportSwizzleStateCreateInfoNV::viewportCount greater or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled and an instance of PipelineViewportExclusiveScissorStateCreateInfoNV chained from VkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with PipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCount greater or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT dynamic state enabled then cmdSetPrimitiveTopologyEXT must have been called in the current command buffer prior to this draw command, and the primitiveTopology parameter of cmdSetPrimitiveTopologyEXT must be of the same topology class as the pipeline PipelineInputAssemblyStateCreateInfo::topology state
• If the primitiveFragmentShadingRateWithMultipleViewports limit is not supported, the bound graphics pipeline was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the PrimitiveShadingRateKHR built-in, then cmdSetViewportWithCountEXT must have been called in the current command buffer prior to this draw command, and the viewportCount parameter of cmdSetViewportWithCountEXT must be 1
• taskCount must be less than or equal to PhysicalDeviceMeshShaderPropertiesNV::maxDrawMeshTasksCount

## Valid Usage (Implicit)

• commandBuffer must be a valid CommandBuffer handle
• commandBuffer must be in the recording state
• The CommandPool that commandBuffer was allocated from must support graphics operations
• This command must only be called inside of a render pass instance

## Host Synchronization

• Host access to commandBuffer must be externally synchronized
• Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

## Command Properties

'

Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type
Primary Secondary Inside Graphics Graphics

CommandBuffer

Arguments

 :: forall io. MonadIO io => CommandBuffer commandBuffer is the command buffer into which the command is recorded. -> Buffer buffer is the buffer containing draw parameters. -> ("offset" ::: DeviceSize) offset is the byte offset into buffer where parameters begin. -> ("drawCount" ::: Word32) drawCount is the number of draws to execute, and can be zero. -> ("stride" ::: Word32) stride is the byte stride between successive sets of draw parameters. -> io ()

vkCmdDrawMeshTasksIndirectNV - Issue an indirect mesh tasks draw into a command buffer

# Description

cmdDrawMeshTasksIndirectNV behaves similarly to cmdDrawMeshTasksNV except that the parameters are read by the device from a buffer during execution. drawCount draws are executed by the command, with parameters taken from buffer starting at offset and increasing by stride bytes for each successive draw. The parameters of each draw are encoded in an array of DrawMeshTasksIndirectCommandNV structures. If drawCount is less than or equal to one, stride is ignored.

## Valid Usage

• If a Sampler created with magFilter or minFilter equal to FILTER_LINEAR and compareEnable equal to FALSE is used to sample a ImageView as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
• If a ImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
• If a ImageView is sampled with FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
• Any ImageView being sampled with FILTER_CUBIC_EXT as a result of this command must have a ImageViewType and format that supports cubic filtering, as specified by FilterCubicImageViewImageFormatPropertiesEXT::filterCubic returned by getPhysicalDeviceImageFormatProperties2
• Any ImageView being sampled with FILTER_CUBIC_EXT with a reduction mode of either SAMPLER_REDUCTION_MODE_MIN or SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a ImageViewType and format that supports cubic filtering together with minmax filtering, as specified by FilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by getPhysicalDeviceImageFormatProperties2
• Any Image created with a ImageCreateInfo::flags containing IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a SamplerAddressMode of SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
• 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 a PipelineLayout that is compatible for set n, with the PipelineLayout used to create the current Pipeline, as described in ???
• 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 a PipelineLayout that is compatible for push constants, with the PipelineLayout used to create the current Pipeline, as described in ???
• Descriptors in each bound descriptor set, specified via cmdBindDescriptorSets, must be valid if they are statically used by the Pipeline bound to the pipeline bind point used by this command
• A valid pipeline must be bound to the pipeline bind point used by this command
• If the Pipeline object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set for commandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic
• 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 a Sampler object that uses unnormalized coordinates, that sampler must not be used to sample from any Image with a ImageView of the type IMAGE_VIEW_TYPE_3D, IMAGE_VIEW_TYPE_CUBE, IMAGE_VIEW_TYPE_1D_ARRAY, IMAGE_VIEW_TYPE_2D_ARRAY or IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage
• If the Pipeline object bound to the pipeline bind point used by this command accesses a Sampler object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage
• If the Pipeline object bound to the pipeline bind point used by this command accesses a Sampler object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage
• If the robust buffer access feature is not enabled, and if the Pipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, it 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 the robust buffer access feature is not enabled, and if the Pipeline object bound to the pipeline bind point used by this command accesses a storage buffer, it 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, any resource accessed by the Pipeline object bound to the pipeline bind point used by this command must not be a protected resource
• If a ImageView is accessed using OpImageWrite as a result of this command, then the Type of the Texel operand of that instruction must have at least as many components as the image view’s format.
• If a BufferView is accessed using OpImageWrite as a result of this command, then the Type of the Texel operand of that instruction must have at least as many components as the image view’s format.
• If a ImageView with a Format that has a 64-bit channel width is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 64.
• If a ImageView with a Format that has a channel width less than 64-bit is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 32.
• If a BufferView with a Format that has a 64-bit channel width is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 64.
• If a BufferView with a Format that has a channel width less than 64-bit is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 32.
• If the sparseImageInt64Atomics feature is not enabled, Image objects created with the IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an OpTypeImage with a SampledType with a Width of 64 by this command.
• If the sparseImageInt64Atomics feature is not enabled, Buffer objects created with the BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an OpTypeImage with a SampledType with a Width of 64 by this command.
• The current render pass must be compatible with the renderPass member of the GraphicsPipelineCreateInfo structure specified when creating the Pipeline bound to PIPELINE_BIND_POINT_GRAPHICS
• The subpass index of the current render pass must be equal to the subpass member of the GraphicsPipelineCreateInfo structure specified when creating the Pipeline bound to PIPELINE_BIND_POINT_GRAPHICS
• Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
• Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this 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 to TRUE and the current subpass has a depth/stencil attachment, then that attachment must have been created with the IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, but not the DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT dynamic state enabled, then cmdSetViewportWithCountEXT must have been called in the current command buffer prior to this draw command, and the viewportCount parameter of cmdSetViewportWithCountEXT must match the PipelineViewportStateCreateInfo::scissorCount of the pipeline
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT dynamic state enabled, but not the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, then cmdSetScissorWithCountEXT must have been called in the current command buffer prior to this draw command, and the scissorCount parameter of cmdSetScissorWithCountEXT must match the PipelineViewportStateCreateInfo::viewportCount of the pipeline
• If the bound graphics pipeline state was created with both the DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT and DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic states enabled then both cmdSetViewportWithCountEXT and cmdSetScissorWithCountEXT must have been called in the current command buffer prior to this draw command, and the viewportCount parameter of cmdSetViewportWithCountEXT must match the scissorCount parameter of cmdSetScissorWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, but not the DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with PipelineViewportWScalingStateCreateInfoNV::viewportCount greater or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT and DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic states enabled then the viewportCount parameter in the last call to cmdSetViewportWScalingNV must be greater than or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, but not the DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with PipelineViewportShadingRateImageStateCreateInfoNV::viewportCount greater or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT and DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic states enabled then the viewportCount parameter in the last call to cmdSetViewportShadingRatePaletteNV must be greater than or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled and an instance of PipelineViewportSwizzleStateCreateInfoNV chained from VkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with PipelineViewportSwizzleStateCreateInfoNV::viewportCount greater or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled and an instance of PipelineViewportExclusiveScissorStateCreateInfoNV chained from VkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with PipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCount greater or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT dynamic state enabled then cmdSetPrimitiveTopologyEXT must have been called in the current command buffer prior to this draw command, and the primitiveTopology parameter of cmdSetPrimitiveTopologyEXT must be of the same topology class as the pipeline PipelineInputAssemblyStateCreateInfo::topology state
• If the primitiveFragmentShadingRateWithMultipleViewports limit is not supported, the bound graphics pipeline was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the PrimitiveShadingRateKHR built-in, then cmdSetViewportWithCountEXT must have been called in the current command buffer prior to this draw command, and the viewportCount parameter of cmdSetViewportWithCountEXT must be 1
• If buffer is non-sparse then it must be bound completely and contiguously to a single DeviceMemory object
• buffer must have been created with the BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set
• offset must be a multiple of 4
• commandBuffer must not be a protected command buffer
• If the multi-draw indirect feature is not enabled, drawCount must be 0 or 1
• drawCount must be less than or equal to PhysicalDeviceLimits::maxDrawIndirectCount
• If drawCount is greater than 1, stride must be a multiple of 4 and must be greater than or equal to sizeof(DrawMeshTasksIndirectCommandNV)
• If drawCount is equal to 1, (offset + sizeof(DrawMeshTasksIndirectCommandNV)) must be less than or equal to the size of buffer
• If drawCount is greater than 1, (stride × (drawCount - 1) + offset + sizeof(DrawMeshTasksIndirectCommandNV)) must be less than or equal to the size of buffer

## Valid Usage (Implicit)

• commandBuffer must be a valid CommandBuffer handle
• buffer must be a valid Buffer handle
• commandBuffer must be in the recording state
• The CommandPool that commandBuffer was allocated from must support graphics operations
• This command must only be called inside of a render pass instance
• Both of buffer, and commandBuffer must have been created, allocated, or retrieved from the same Device

## Host Synchronization

• Host access to commandBuffer must be externally synchronized
• Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

## Command Properties

'

Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type
Primary Secondary Inside Graphics Graphics

Buffer, CommandBuffer, DeviceSize

Arguments

 :: forall io. MonadIO io => CommandBuffer commandBuffer is the command buffer into which the command is recorded. -> Buffer buffer is the buffer containing draw parameters. -> ("offset" ::: DeviceSize) offset is the byte offset into buffer where parameters begin. -> ("countBuffer" ::: Buffer) countBuffer is the buffer containing the draw count. -> ("countBufferOffset" ::: DeviceSize) countBufferOffset is the byte offset into countBuffer where the draw count begins. -> ("maxDrawCount" ::: Word32) maxDrawCount specifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified in countBuffer and maxDrawCount. -> ("stride" ::: Word32) stride is the byte stride between successive sets of draw parameters. -> io ()

vkCmdDrawMeshTasksIndirectCountNV - Perform an indirect mesh tasks draw with the draw count sourced from a buffer

# Description

cmdDrawMeshTasksIndirectCountNV behaves similarly to cmdDrawMeshTasksIndirectNV except that the draw count is read by the device from a buffer during execution. The command will read an unsigned 32-bit integer from countBuffer located at countBufferOffset and use this as the draw count.

## Valid Usage

• If a Sampler created with magFilter or minFilter equal to FILTER_LINEAR and compareEnable equal to FALSE is used to sample a ImageView as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
• If a ImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
• If a ImageView is sampled with FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
• Any ImageView being sampled with FILTER_CUBIC_EXT as a result of this command must have a ImageViewType and format that supports cubic filtering, as specified by FilterCubicImageViewImageFormatPropertiesEXT::filterCubic returned by getPhysicalDeviceImageFormatProperties2
• Any ImageView being sampled with FILTER_CUBIC_EXT with a reduction mode of either SAMPLER_REDUCTION_MODE_MIN or SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a ImageViewType and format that supports cubic filtering together with minmax filtering, as specified by FilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by getPhysicalDeviceImageFormatProperties2
• Any Image created with a ImageCreateInfo::flags containing IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a SamplerAddressMode of SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
• 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 a PipelineLayout that is compatible for set n, with the PipelineLayout used to create the current Pipeline, as described in ???
• 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 a PipelineLayout that is compatible for push constants, with the PipelineLayout used to create the current Pipeline, as described in ???
• Descriptors in each bound descriptor set, specified via cmdBindDescriptorSets, must be valid if they are statically used by the Pipeline bound to the pipeline bind point used by this command
• A valid pipeline must be bound to the pipeline bind point used by this command
• If the Pipeline object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set for commandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic
• 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 a Sampler object that uses unnormalized coordinates, that sampler must not be used to sample from any Image with a ImageView of the type IMAGE_VIEW_TYPE_3D, IMAGE_VIEW_TYPE_CUBE, IMAGE_VIEW_TYPE_1D_ARRAY, IMAGE_VIEW_TYPE_2D_ARRAY or IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage
• If the Pipeline object bound to the pipeline bind point used by this command accesses a Sampler object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage
• If the Pipeline object bound to the pipeline bind point used by this command accesses a Sampler object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage
• If the robust buffer access feature is not enabled, and if the Pipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, it 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 the robust buffer access feature is not enabled, and if the Pipeline object bound to the pipeline bind point used by this command accesses a storage buffer, it 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, any resource accessed by the Pipeline object bound to the pipeline bind point used by this command must not be a protected resource
• If a ImageView is accessed using OpImageWrite as a result of this command, then the Type of the Texel operand of that instruction must have at least as many components as the image view’s format.
• If a BufferView is accessed using OpImageWrite as a result of this command, then the Type of the Texel operand of that instruction must have at least as many components as the image view’s format.
• If a ImageView with a Format that has a 64-bit channel width is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 64.
• If a ImageView with a Format that has a channel width less than 64-bit is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 32.
• If a BufferView with a Format that has a 64-bit channel width is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 64.
• If a BufferView with a Format that has a channel width less than 64-bit is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 32.
• If the sparseImageInt64Atomics feature is not enabled, Image objects created with the IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an OpTypeImage with a SampledType with a Width of 64 by this command.
• If the sparseImageInt64Atomics feature is not enabled, Buffer objects created with the BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an OpTypeImage with a SampledType with a Width of 64 by this command.
• The current render pass must be compatible with the renderPass member of the GraphicsPipelineCreateInfo structure specified when creating the Pipeline bound to PIPELINE_BIND_POINT_GRAPHICS
• The subpass index of the current render pass must be equal to the subpass member of the GraphicsPipelineCreateInfo structure specified when creating the Pipeline bound to PIPELINE_BIND_POINT_GRAPHICS
• Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
• Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this 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 to TRUE and the current subpass has a depth/stencil attachment, then that attachment must have been created with the IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, but not the DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT dynamic state enabled, then cmdSetViewportWithCountEXT must have been called in the current command buffer prior to this draw command, and the viewportCount parameter of cmdSetViewportWithCountEXT must match the PipelineViewportStateCreateInfo::scissorCount of the pipeline
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT dynamic state enabled, but not the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, then cmdSetScissorWithCountEXT must have been called in the current command buffer prior to this draw command, and the scissorCount parameter of cmdSetScissorWithCountEXT must match the PipelineViewportStateCreateInfo::viewportCount of the pipeline
• If the bound graphics pipeline state was created with both the DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT and DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic states enabled then both cmdSetViewportWithCountEXT and cmdSetScissorWithCountEXT must have been called in the current command buffer prior to this draw command, and the viewportCount parameter of cmdSetViewportWithCountEXT must match the scissorCount parameter of cmdSetScissorWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, but not the DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, then the bound graphics pipeline must have been created with PipelineViewportWScalingStateCreateInfoNV::viewportCount greater or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT and DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic states enabled then the viewportCount parameter in the last call to cmdSetViewportWScalingNV must be greater than or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, but not the DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic state enabled, then the bound graphics pipeline must have been created with PipelineViewportShadingRateImageStateCreateInfoNV::viewportCount greater or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT and DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic states enabled then the viewportCount parameter in the last call to cmdSetViewportShadingRatePaletteNV must be greater than or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled and an instance of PipelineViewportSwizzleStateCreateInfoNV chained from VkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with PipelineViewportSwizzleStateCreateInfoNV::viewportCount greater or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled and an instance of PipelineViewportExclusiveScissorStateCreateInfoNV chained from VkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with PipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCount greater or equal to the viewportCount parameter in the last call to cmdSetViewportWithCountEXT
• If the bound graphics pipeline state was created with the DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT dynamic state enabled then cmdSetPrimitiveTopologyEXT must have been called in the current command buffer prior to this draw command, and the primitiveTopology parameter of cmdSetPrimitiveTopologyEXT must be of the same topology class as the pipeline PipelineInputAssemblyStateCreateInfo::topology state
• If the primitiveFragmentShadingRateWithMultipleViewports limit is not supported, the bound graphics pipeline was created with the DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to the PrimitiveShadingRateKHR built-in, then cmdSetViewportWithCountEXT must have been called in the current command buffer prior to this draw command, and the viewportCount parameter of cmdSetViewportWithCountEXT must be 1
• If buffer is non-sparse then it must be bound completely and contiguously to a single DeviceMemory object
• buffer must have been created with the BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set
• offset must be a multiple of 4
• commandBuffer must not be a protected command buffer
• If countBuffer is non-sparse then it must be bound completely and contiguously to a single DeviceMemory object
• countBuffer must have been created with the BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set
• countBufferOffset must be a multiple of 4
• The count stored in countBuffer must be less than or equal to PhysicalDeviceLimits::maxDrawIndirectCount
• (countBufferOffset + sizeof(uint32_t)) must be less than or equal to the size of countBuffer
• If drawIndirectCount is not enabled this function must not be used
• stride must be a multiple of 4 and must be greater than or equal to sizeof(DrawMeshTasksIndirectCommandNV)
• If maxDrawCount is greater than or equal to 1, (stride × (maxDrawCount - 1) + offset + sizeof(DrawMeshTasksIndirectCommandNV)) must be less than or equal to the size of buffer
• If the count stored in countBuffer is equal to 1, (offset + sizeof(DrawMeshTasksIndirectCommandNV)) must be less than or equal to the size of buffer
• If the count stored in countBuffer is greater than 1, (stride × (drawCount - 1) + offset + sizeof(DrawMeshTasksIndirectCommandNV)) must be less than or equal to the size of buffer

## Valid Usage (Implicit)

• commandBuffer must be a valid CommandBuffer handle
• buffer must be a valid Buffer handle
• countBuffer must be a valid Buffer handle
• commandBuffer must be in the recording state
• The CommandPool that commandBuffer was allocated from must support graphics operations
• This command must only be called inside of a render pass instance
• Each of buffer, commandBuffer, and countBuffer must have been created, allocated, or retrieved from the same Device

## Host Synchronization

• Host access to commandBuffer must be externally synchronized
• Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

## Command Properties

'

Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type
Primary Secondary Inside Graphics Graphics

Buffer, CommandBuffer, DeviceSize

VkPhysicalDeviceMeshShaderFeaturesNV - Structure describing mesh shading features that can be supported by an implementation

# Description

If the PhysicalDeviceMeshShaderFeaturesNV structure is included in the pNext chain of PhysicalDeviceFeatures2, it is filled with a value indicating whether the feature is supported. PhysicalDeviceMeshShaderFeaturesNV can also be included in pNext chain of DeviceCreateInfo to enable the features.

## Valid Usage (Implicit)

Bool32, StructureType

Constructors

 PhysicalDeviceMeshShaderFeaturesNV FieldstaskShader :: BooltaskShader indicates whether the task shader stage is supported.meshShader :: BoolmeshShader indicates whether the mesh shader stage is supported.

#### Instances

Instances details
 Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Methods Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Methods Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Methods

# Members

The members of the PhysicalDeviceMeshShaderPropertiesNV structure describe the following implementation-dependent limits:

# Description

If the PhysicalDeviceMeshShaderPropertiesNV structure is included in the pNext chain of PhysicalDeviceProperties2, it is filled with the implementation-dependent limits.

## Valid Usage (Implicit)

StructureType

Constructors

 PhysicalDeviceMeshShaderPropertiesNV FieldsmaxDrawMeshTasksCount :: Word32maxDrawMeshTasksCount is the maximum number of local workgroups that can be launched by a single draw mesh tasks command. See https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#drawing-mesh-shading.maxTaskWorkGroupInvocations :: Word32maxTaskWorkGroupInvocations is the maximum total number of task shader invocations in a single local workgroup. The product of the X, Y, and Z sizes, as specified by the LocalSize execution mode in shader modules or by the object decorated by the WorkgroupSize decoration, must be less than or equal to this limit.maxTaskWorkGroupSize :: (Word32, Word32, Word32)maxTaskWorkGroupSize[3] is the maximum size of a local task workgroup. These three values represent the maximum local workgroup size in the X, Y, and Z dimensions, respectively. The x, y, and z sizes, as specified by the LocalSize execution mode or by the object decorated by the WorkgroupSize decoration in shader modules, must be less than or equal to the corresponding limit.maxTaskTotalMemorySize :: Word32maxTaskTotalMemorySize is the maximum number of bytes that the task shader can use in total for shared and output memory combined.maxTaskOutputCount :: Word32maxTaskOutputCount is the maximum number of output tasks a single task shader workgroup can emit.maxMeshWorkGroupInvocations :: Word32maxMeshWorkGroupInvocations is the maximum total number of mesh shader invocations in a single local workgroup. The product of the X, Y, and Z sizes, as specified by the LocalSize execution mode in shader modules or by the object decorated by the WorkgroupSize decoration, must be less than or equal to this limit.maxMeshWorkGroupSize :: (Word32, Word32, Word32)maxMeshWorkGroupSize[3] is the maximum size of a local mesh workgroup. These three values represent the maximum local workgroup size in the X, Y, and Z dimensions, respectively. The x, y, and z sizes, as specified by the LocalSize execution mode or by the object decorated by the WorkgroupSize decoration in shader modules, must be less than or equal to the corresponding limit.maxMeshTotalMemorySize :: Word32maxMeshTotalMemorySize is the maximum number of bytes that the mesh shader can use in total for shared and output memory combined.maxMeshOutputVertices :: Word32maxMeshOutputVertices is the maximum number of vertices a mesh shader output can store.maxMeshOutputPrimitives :: Word32maxMeshOutputPrimitives is the maximum number of primitives a mesh shader output can store.maxMeshMultiviewViewCount :: Word32maxMeshMultiviewViewCount is the maximum number of multi-view views a mesh shader can use.meshOutputPerVertexGranularity :: Word32meshOutputPerVertexGranularity is the granularity with which mesh vertex outputs are allocated. The value can be used to compute the memory size used by the mesh shader, which must be less than or equal to maxMeshTotalMemorySize.meshOutputPerPrimitiveGranularity :: Word32meshOutputPerPrimitiveGranularity is the granularity with which mesh outputs qualified as per-primitive are allocated. The value can be used to compute the memory size used by the mesh shader, which must be less than or equal to maxMeshTotalMemorySize.

#### Instances

Instances details
 Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Methods Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Methods Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Methods

# Description

The members of DrawMeshTasksIndirectCommandNV have the same meaning as the similarly named parameters of cmdDrawMeshTasksNV.

## Valid Usage

cmdDrawMeshTasksIndirectNV

Constructors

 DrawMeshTasksIndirectCommandNV FieldstaskCount :: Word32taskCount is the number of local workgroups to dispatch in the X dimension. Y and Z dimension are implicitly set to one.taskCount must be less than or equal to PhysicalDeviceMeshShaderPropertiesNV::maxDrawMeshTasksCountfirstTask :: Word32firstTask is the X component of the first workgroup ID.

#### Instances

Instances details
 Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Methods Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Methods Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Methods Source # Instance detailsDefined in Vulkan.Extensions.VK_NV_mesh_shader Methods

pattern NV_MESH_SHADER_SPEC_VERSION :: forall a. Integral a => a Source #