Class NVMeshShader
- java.lang.Object
-
- org.lwjgl.vulkan.NVMeshShader
-
public class NVMeshShader extends java.lang.Object
This extension provides a new mechanism allowing applications to generate collections of geometric primitives via programmable mesh shading. It is an alternative to the existing programmable primitive shading pipeline, which relied on generating input primitives by a fixed function assembler as well as fixed function vertex fetch.There are new programmable shader types -- the task and mesh shader -- to generate these collections to be processed by fixed-function primitive assembly and rasterization logic. When the task and mesh shaders are dispatched, they replace the standard programmable vertex processing pipeline, including vertex array attribute fetching, vertex shader processing, tessellation, and the geometry shader processing.
This extension also adds support for the following SPIR-V extension in Vulkan:
- Name String
VK_NV_mesh_shader
- Extension Type
- Device extension
- Registered Extension Number
- 203
- Revision
- 1
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Requires
VK_KHR_get_physical_device_properties2
- Contact
- Christoph Kubisch pixeljetstream
- Last Modified Date
- 2018-07-19
- Contributors
- Pat Brown, NVIDIA
- Jeff Bolz, NVIDIA
- Daniel Koch, NVIDIA
- Piers Daniell, NVIDIA
- Pierre Boudier, NVIDIA
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
VK_NV_MESH_SHADER_EXTENSION_NAME
The extension name.static int
VK_NV_MESH_SHADER_SPEC_VERSION
The extension specification version.static int
VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV
VK_PIPELINE_STAGE_TASK_SHADER_BIT_NVExtendsVkPipelineStageFlagBits
.static int
VK_SHADER_STAGE_MESH_BIT_NV
VK_SHADER_STAGE_TASK_BIT_NVExtendsVkShaderStageFlagBits
.static int
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NVExtendsVkStructureType
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
vkCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, long buffer, long offset, long countBuffer, long countBufferOffset, int maxDrawCount, int stride)
Perform an indirect mesh tasks draw with the draw count sourced from a buffer.static void
vkCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, long buffer, long offset, int drawCount, int stride)
Issue an indirect mesh tasks draw into a command buffer.static void
vkCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, int taskCount, int firstTask)
Draw mesh task work items.
-
-
-
Field Detail
-
VK_NV_MESH_SHADER_SPEC_VERSION
The extension specification version.
-
VK_NV_MESH_SHADER_EXTENSION_NAME
The extension name.
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV
ExtendsVkStructureType
.Enum values:
-
VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV, VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV
ExtendsVkPipelineStageFlagBits
.Enum values:
-
-
Method Detail
-
vkCmdDrawMeshTasksNV
public static void vkCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, int taskCount, int firstTask)
Draw mesh task work items.C Specification
To record a draw that uses the mesh pipeline, call:
void vkCmdDrawMeshTasksNV( VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask);
Description
When the command is executed, a global workgroup consisting of
taskCount
local workgroups is assembled.Valid Usage
- If a
VkImageView
is sampled withFILTER_LINEAR
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
VkImageView
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
VkImageView
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
VkImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubic
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
with a reduction mode of eitherSAMPLER_REDUCTION_MODE_MIN_EXT
orSAMPLER_REDUCTION_MODE_MAX_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubicMinmax
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImage
created with aVkImageCreateInfo
::flags
containingIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
sampled as a result of this command must only be sampled using aVkSamplerAddressMode
ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
. - For each set n that is statically used by the
VkPipeline
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 aVkPipelineLayout
that is compatible for set n, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - For each push constant that is statically used by the
VkPipeline
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 aVkPipelineLayout
that is compatible for push constants, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets
, must be valid if they are statically used by theVkPipeline
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
VkPipeline
object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set forcommandBuffer
- If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImage
with aVkImageView
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
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
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
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
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 the robust buffer access feature is not enabled, and if the
VkPipeline
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
VkPipeline
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 theVkPipeline
object bound to the pipeline bind point used by this command must not be a protected resource - The current render pass must be compatible with the
renderPass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_BIND_POINT_GRAPHICS
. - The subpass index of the current render pass must be equal to the
subpass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_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
VkPhysicalDeviceMultiviewProperties
::maxMultiviewInstanceIndex
. - If the bound graphics pipeline was created with
VkPipelineSampleLocationsStateCreateInfoEXT
::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 taskCount
must be less than or equal toVkPhysicalDeviceMeshShaderPropertiesNV
::maxDrawMeshTasksCount
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
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
VkCommandPool
thatcommandBuffer
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 - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.taskCount
- the number of local workgroups to dispatch in the X dimension. Y and Z dimension are implicitly set to one.firstTask
- the X component of the first workgroup ID.
- If a
-
vkCmdDrawMeshTasksIndirectNV
public static void vkCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, long buffer, long offset, int drawCount, int stride)
Issue an indirect mesh tasks draw into a command buffer.C Specification
To record an indirect mesh tasks draw, call:
void vkCmdDrawMeshTasksIndirectNV( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
Description
vkCmdDrawMeshTasksIndirectNV
behaves similarly toCmdDrawMeshTasksNV
except that the parameters are read by the device from a buffer during execution.drawCount
draws are executed by the command, with parameters taken frombuffer
starting atoffset
and increasing bystride
bytes for each successive draw. The parameters of each draw are encoded in an array ofVkDrawMeshTasksIndirectCommandNV
structures. IfdrawCount
is less than or equal to one,stride
is ignored.Valid Usage
- If a
VkImageView
is sampled withFILTER_LINEAR
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
VkImageView
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
VkImageView
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
VkImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubic
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
with a reduction mode of eitherSAMPLER_REDUCTION_MODE_MIN_EXT
orSAMPLER_REDUCTION_MODE_MAX_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubicMinmax
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImage
created with aVkImageCreateInfo
::flags
containingIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
sampled as a result of this command must only be sampled using aVkSamplerAddressMode
ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
. - For each set n that is statically used by the
VkPipeline
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 aVkPipelineLayout
that is compatible for set n, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - For each push constant that is statically used by the
VkPipeline
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 aVkPipelineLayout
that is compatible for push constants, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets
, must be valid if they are statically used by theVkPipeline
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
VkPipeline
object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set forcommandBuffer
- If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImage
with aVkImageView
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
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
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
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
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 the robust buffer access feature is not enabled, and if the
VkPipeline
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
VkPipeline
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 theVkPipeline
object bound to the pipeline bind point used by this command must not be a protected resource - The current render pass must be compatible with the
renderPass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_BIND_POINT_GRAPHICS
. - The subpass index of the current render pass must be equal to the
subpass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_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
VkPhysicalDeviceMultiviewProperties
::maxMultiviewInstanceIndex
. - If the bound graphics pipeline was created with
VkPipelineSampleLocationsStateCreateInfoEXT
::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
buffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object buffer
must have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BIT
bit setoffset
must be a multiple of 4commandBuffer
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 toVkPhysicalDeviceLimits
::maxDrawIndirectCount
- If
drawCount
is greater than 1,stride
must be a multiple of 4 and must be greater than or equal tosizeof
(VkDrawMeshTasksIndirectCommandNV
) - If
drawCount
is equal to 1,(offset sizeof(
must be less than or equal to the size ofVkDrawMeshTasksIndirectCommandNV
))buffer
- If
drawCount
is greater than 1,(stride × (drawCount - 1) + offset sizeof(
must be less than or equal to the size ofVkDrawMeshTasksIndirectCommandNV
))buffer
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlebuffer
must be a validVkBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called inside of a render pass instance
- Both of
buffer
, andcommandBuffer
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
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 - Parameters:
commandBuffer
- the command buffer into which the command is recorded.buffer
- the buffer containing draw parameters.offset
- the byte offset intobuffer
where parameters begin.drawCount
- the number of draws to execute, and can be zero.stride
- the byte stride between successive sets of draw parameters.
- If a
-
vkCmdDrawMeshTasksIndirectCountNV
public static void vkCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, long buffer, long offset, long countBuffer, long countBufferOffset, int maxDrawCount, int stride)
Perform an indirect mesh tasks draw with the draw count sourced from a buffer.C Specification
To record an indirect mesh tasks draw with the draw count sourced from a buffer, call:
void vkCmdDrawMeshTasksIndirectCountNV( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
Description
vkCmdDrawMeshTasksIndirectCountNV
behaves similarly toCmdDrawMeshTasksIndirectNV
except that the draw count is read by the device from a buffer during execution. The command will read an unsigned 32-bit integer fromcountBuffer
located atcountBufferOffset
and use this as the draw count.Valid Usage
- If a
VkImageView
is sampled withFILTER_LINEAR
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
VkImageView
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
VkImageView
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
VkImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubic
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
with a reduction mode of eitherSAMPLER_REDUCTION_MODE_MIN_EXT
orSAMPLER_REDUCTION_MODE_MAX_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubicMinmax
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImage
created with aVkImageCreateInfo
::flags
containingIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
sampled as a result of this command must only be sampled using aVkSamplerAddressMode
ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
. - For each set n that is statically used by the
VkPipeline
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 aVkPipelineLayout
that is compatible for set n, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - For each push constant that is statically used by the
VkPipeline
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 aVkPipelineLayout
that is compatible for push constants, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets
, must be valid if they are statically used by theVkPipeline
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
VkPipeline
object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set forcommandBuffer
- If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImage
with aVkImageView
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
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
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
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
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 the robust buffer access feature is not enabled, and if the
VkPipeline
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
VkPipeline
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 theVkPipeline
object bound to the pipeline bind point used by this command must not be a protected resource - The current render pass must be compatible with the
renderPass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_BIND_POINT_GRAPHICS
. - The subpass index of the current render pass must be equal to the
subpass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_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
VkPhysicalDeviceMultiviewProperties
::maxMultiviewInstanceIndex
. - If the bound graphics pipeline was created with
VkPipelineSampleLocationsStateCreateInfoEXT
::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
buffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object buffer
must have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BIT
bit setoffset
must be a multiple of 4commandBuffer
must not be a protected command buffer- If
countBuffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object countBuffer
must have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BIT
bit setcountBufferOffset
must be a multiple of 4- The count stored in
countBuffer
must be less than or equal toVkPhysicalDeviceLimits
::maxDrawIndirectCount
stride
must be a multiple of 4 and must be greater than or equal tosizeof
(VkDrawMeshTasksIndirectCommandNV
)- If
maxDrawCount
is greater than or equal to 1,(stride × (maxDrawCount - 1) + offset + sizeof(
must be less than or equal to the size ofVkDrawMeshTasksIndirectCommandNV
))buffer
- If the count stored in
countBuffer
is equal to 1,(offset sizeof(
must be less than or equal to the size ofVkDrawMeshTasksIndirectCommandNV
))buffer
- If the count stored in
countBuffer
is greater than 1,(stride × (drawCount - 1) + offset + sizeof(
must be less than or equal to the size ofVkDrawMeshTasksIndirectCommandNV
))buffer
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlebuffer
must be a validVkBuffer
handlecountBuffer
must be a validVkBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called inside of a render pass instance
- Each of
buffer
,commandBuffer
, andcountBuffer
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
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 - Parameters:
commandBuffer
- the command buffer into which the command is recorded.buffer
- the buffer containing draw parameters.offset
- the byte offset intobuffer
where parameters begin.countBuffer
- the buffer containing the draw count.countBufferOffset
- the byte offset intocountBuffer
where the draw count begins.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 incountBuffer
andmaxDrawCount
.stride
- the byte stride between successive sets of draw parameters.
- If a
-
-