Class NVMeshShader
- java.lang.Object
-
- org.lwjgl.vulkan.NVMeshShader
-
public class NVMeshShader extends java.lang.ObjectThis 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 task and mesh shaders are dispatched, they replace the core pre-rasterization stages, including vertex array attribute fetching, vertex shader processing, tessellation, and geometry shader processing.
This extension also adds support for the following SPIR-V extension in Vulkan:
VK_NV_mesh_shader
- 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
Other Extension Metadata
- Last Modified Date
- 2018-07-19
- Interactions and External Dependencies
- This extension requires
SPV_NV_mesh_shader - This extension provides API support for
GLSL_NV_mesh_shader
- This extension requires
- 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.StringVK_NV_MESH_SHADER_EXTENSION_NAMEThe extension name.static intVK_NV_MESH_SHADER_SPEC_VERSIONThe extension specification version.static intVK_PIPELINE_STAGE_MESH_SHADER_BIT_NV
VK_PIPELINE_STAGE_TASK_SHADER_BIT_NVExtendsVkPipelineStageFlagBits.static intVK_SHADER_STAGE_MESH_BIT_NV
VK_SHADER_STAGE_TASK_BIT_NVExtendsVkShaderStageFlagBits.static intVK_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 voidvkCmdDrawMeshTasksIndirectCountNV(org.lwjgl.vulkan.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 voidvkCmdDrawMeshTasksIndirectNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long buffer, long offset, int drawCount, int stride)Issue an indirect mesh tasks draw into a command buffer.static voidvkCmdDrawMeshTasksNV(org.lwjgl.vulkan.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(org.lwjgl.vulkan.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
taskCountlocal workgroups is assembled.Valid Usage
- If a
VkSamplercreated withmagFilterorminFilterequal toFILTER_LINEARandcompareEnableequal toFALSEis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
VkSamplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toFALSEis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
VkImageViewis sampled with depth comparison, the image view’s format features must containFORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT - If a
VkImageViewis 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
VkImageViewis sampled withFILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT - Any
VkImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must have aVkImageViewTypeand format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 - Any
VkImageViewbeing sampled withFILTER_CUBIC_EXTwith a reduction mode of eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXas a result of this command must have aVkImageViewTypeand format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 - Any
VkImagecreated with aVkImageCreateInfo::flagscontainingIMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using aVkSamplerAddressModeofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE - Any
VkImageVieworVkBufferViewbeing written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT - Any
VkImageVieworVkBufferViewbeing read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For each set n that is statically used by the
VkPipelinebound 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 aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility - If the
maintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused 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 theVkPipelinebound 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
VkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, 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
VkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeIMAGE_VIEW_TYPE_3D,IMAGE_VIEW_TYPE_CUBE,IMAGE_VIEW_TYPE_1D_ARRAY,IMAGE_VIEW_TYPE_2D_ARRAYorIMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject 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
VkPipelineobject 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
VkPipelineobject 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
commandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by theVkPipelineobject bound to the pipeline bind point used by this command must not be a protected resource - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands - If a
VkImageViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format - If a
VkBufferViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the buffer view’s format - If a
VkImageViewwith aVkFormatthat has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 - If a
VkImageViewwith aVkFormatthat has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 - If a
VkBufferViewwith aVkFormatthat has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 - If a
VkBufferViewwith aVkFormatthat has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 - If the
sparseImageInt64Atomicsfeature is not enabled,VkImageobjects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If the
sparseImageInt64Atomicsfeature is not enabled,VkBufferobjects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - The current render pass must be compatible with the
renderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toPIPELINE_BIND_POINT_GRAPHICS - The subpass index of the current render pass must be equal to the
subpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toPIPELINE_BIND_POINT_GRAPHICS - Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
- 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 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::sampleLocationsEnableset toTRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theIMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, thenCmdSetViewportWithCountmust have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, thenCmdSetScissorWithCountmust have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline - If the bound graphics pipeline state was created with both the
DYNAMIC_STATE_SCISSOR_WITH_COUNTandDYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then bothCmdSetViewportWithCountandCmdSetScissorWithCountmust have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created withVkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTandDYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call toCmdSetViewportWScalingNVmust be greater than or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created withVkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTandDYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call toCmdSetViewportShadingRatePaletteNVmust be greater than or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and aVkPipelineViewportSwizzleStateCreateInfoNVstructure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created withVkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and aVkPipelineViewportExclusiveScissorStateCreateInfoNVstructure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created withVkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled thenCmdSetRasterizerDiscardEnablemust 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_ENABLEdynamic state enabled thenCmdSetDepthBiasEnablemust 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_EXTdynamic state enabled thenCmdSetLogicOpEXTmust have been called in the current command buffer prior to this drawing command and thelogicOpmust be a validVkLogicOpvalue - If the
primitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theDYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, thenCmdSetViewportWithCountmust have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be 1 - 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 theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beFALSE - If rasterization is not disabled in the bound graphics pipeline, and neither the
VK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, thenVkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments - If the current render pass instance was begun with
CmdBeginRendering, theimageViewmember ofpDepthAttachmentis notNULL_HANDLE, and thelayoutmember ofpDepthAttachmentisIMAGE_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, theimageViewmember ofpStencilAttachmentis notNULL_HANDLE, and thelayoutmember ofpStencilAttachmentisIMAGE_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, theimageViewmember ofpDepthAttachmentis notNULL_HANDLE, and thelayoutmember ofpDepthAttachmentisIMAGE_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, theimageViewmember ofpStencilAttachmentis notNULL_HANDLE, and thelayoutmember ofpStencilAttachmentisIMAGE_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, theimageViewmember ofpDepthAttachmentis notNULL_HANDLE, and thelayoutmember ofpDepthAttachmentisIMAGE_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, theimageViewmember ofpStencilAttachmentis notNULL_HANDLE, and thelayoutmember ofpStencilAttachmentisIMAGE_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 aVkPipelineRenderingCreateInfo::viewMaskequal toVkRenderingInfo::viewMask - If the current render pass instance was begun with
CmdBeginRendering, the currently bound graphics pipeline must have been created with aVkPipelineRenderingCreateInfo::colorAttachmentCountequal toVkRenderingInfo::colorAttachmentCount - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingInfo::colorAttachmentCountgreater than 0, then each element of theVkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with aVkFormatequal to the corresponding element ofVkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingInfo::pDepthAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to theVkFormatused to createVkRenderingInfo::pDepthAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingInfo::pStencilAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to theVkFormatused to createVkRenderingInfo::pStencilAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas 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
CmdBeginRenderingandVkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas 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
VkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, and the current render pass instance was begun withCmdBeginRenderingwith aVkRenderingInfo::colorAttachmentCountparameter greater than 0, then each element of theVkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember ofVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created with aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pDepthAttachment\u2192pname:imageView was notNULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember ofVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pDepthAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created with aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pStencilAttachment\u2192pname:imageView was notNULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember ofVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pStencilAttachment\u2192pname:imageView - If the currently bound pipeline was created without a
VkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, and the current render pass instance was begun withCmdBeginRenderingwith aVkRenderingInfo::colorAttachmentCountparameter greater than 0, then each element of theVkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with a sample count equal to the value ofVkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created without aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pDepthAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pDepthAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created without aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pStencilAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pStencilAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline must have been created with aVkGraphicsPipelineCreateInfo::renderPassequal toNULL_HANDLE
- The bound graphics pipeline must not have been created with the
VkPipelineShaderStageCreateInfo::stagemember of an element ofVkGraphicsPipelineCreateInfo::pStagesset toSHADER_STAGE_VERTEX_BIT,SHADER_STAGE_TESSELLATION_CONTROL_BIT,SHADER_STAGE_TESSELLATION_EVALUATION_BITorSHADER_STAGE_GEOMETRY_BIT taskCountmust be less than or equal toVkPhysicalDeviceMeshShaderPropertiesNV::maxDrawMeshTasksCount
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Primary Secondary Inside 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(org.lwjgl.vulkan.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
vkCmdDrawMeshTasksIndirectNVbehaves similarly toCmdDrawMeshTasksNVexcept that the parameters are read by the device from a buffer during execution.drawCountdraws are executed by the command, with parameters taken frombufferstarting atoffsetand increasing bystridebytes for each successive draw. The parameters of each draw are encoded in an array ofVkDrawMeshTasksIndirectCommandNVstructures. IfdrawCountis less than or equal to one,strideis ignored.Valid Usage
- If a
VkSamplercreated withmagFilterorminFilterequal toFILTER_LINEARandcompareEnableequal toFALSEis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
VkSamplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toFALSEis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
VkImageViewis sampled with depth comparison, the image view’s format features must containFORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT - If a
VkImageViewis 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
VkImageViewis sampled withFILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT - Any
VkImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must have aVkImageViewTypeand format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 - Any
VkImageViewbeing sampled withFILTER_CUBIC_EXTwith a reduction mode of eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXas a result of this command must have aVkImageViewTypeand format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 - Any
VkImagecreated with aVkImageCreateInfo::flagscontainingIMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using aVkSamplerAddressModeofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE - Any
VkImageVieworVkBufferViewbeing written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT - Any
VkImageVieworVkBufferViewbeing read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For each set n that is statically used by the
VkPipelinebound 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 aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility - If the
maintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused 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 theVkPipelinebound 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
VkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, 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
VkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeIMAGE_VIEW_TYPE_3D,IMAGE_VIEW_TYPE_CUBE,IMAGE_VIEW_TYPE_1D_ARRAY,IMAGE_VIEW_TYPE_2D_ARRAYorIMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject 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
VkPipelineobject 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
VkPipelineobject 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
commandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by theVkPipelineobject bound to the pipeline bind point used by this command must not be a protected resource - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands - If a
VkImageViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format - If a
VkBufferViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the buffer view’s format - If a
VkImageViewwith aVkFormatthat has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 - If a
VkImageViewwith aVkFormatthat has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 - If a
VkBufferViewwith aVkFormatthat has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 - If a
VkBufferViewwith aVkFormatthat has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 - If the
sparseImageInt64Atomicsfeature is not enabled,VkImageobjects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If the
sparseImageInt64Atomicsfeature is not enabled,VkBufferobjects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - The current render pass must be compatible with the
renderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toPIPELINE_BIND_POINT_GRAPHICS - The subpass index of the current render pass must be equal to the
subpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toPIPELINE_BIND_POINT_GRAPHICS - Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
- 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 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::sampleLocationsEnableset toTRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theIMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, thenCmdSetViewportWithCountmust have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, thenCmdSetScissorWithCountmust have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline - If the bound graphics pipeline state was created with both the
DYNAMIC_STATE_SCISSOR_WITH_COUNTandDYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then bothCmdSetViewportWithCountandCmdSetScissorWithCountmust have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created withVkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTandDYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call toCmdSetViewportWScalingNVmust be greater than or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created withVkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTandDYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call toCmdSetViewportShadingRatePaletteNVmust be greater than or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and aVkPipelineViewportSwizzleStateCreateInfoNVstructure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created withVkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and aVkPipelineViewportExclusiveScissorStateCreateInfoNVstructure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created withVkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled thenCmdSetRasterizerDiscardEnablemust 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_ENABLEdynamic state enabled thenCmdSetDepthBiasEnablemust 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_EXTdynamic state enabled thenCmdSetLogicOpEXTmust have been called in the current command buffer prior to this drawing command and thelogicOpmust be a validVkLogicOpvalue - If the
primitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theDYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, thenCmdSetViewportWithCountmust have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be 1 - 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 theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beFALSE - If rasterization is not disabled in the bound graphics pipeline, and neither the
VK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, thenVkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments - If the current render pass instance was begun with
CmdBeginRendering, theimageViewmember ofpDepthAttachmentis notNULL_HANDLE, and thelayoutmember ofpDepthAttachmentisIMAGE_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, theimageViewmember ofpStencilAttachmentis notNULL_HANDLE, and thelayoutmember ofpStencilAttachmentisIMAGE_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, theimageViewmember ofpDepthAttachmentis notNULL_HANDLE, and thelayoutmember ofpDepthAttachmentisIMAGE_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, theimageViewmember ofpStencilAttachmentis notNULL_HANDLE, and thelayoutmember ofpStencilAttachmentisIMAGE_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, theimageViewmember ofpDepthAttachmentis notNULL_HANDLE, and thelayoutmember ofpDepthAttachmentisIMAGE_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, theimageViewmember ofpStencilAttachmentis notNULL_HANDLE, and thelayoutmember ofpStencilAttachmentisIMAGE_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 aVkPipelineRenderingCreateInfo::viewMaskequal toVkRenderingInfo::viewMask - If the current render pass instance was begun with
CmdBeginRendering, the currently bound graphics pipeline must have been created with aVkPipelineRenderingCreateInfo::colorAttachmentCountequal toVkRenderingInfo::colorAttachmentCount - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingInfo::colorAttachmentCountgreater than 0, then each element of theVkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with aVkFormatequal to the corresponding element ofVkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingInfo::pDepthAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to theVkFormatused to createVkRenderingInfo::pDepthAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingInfo::pStencilAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to theVkFormatused to createVkRenderingInfo::pStencilAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas 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
CmdBeginRenderingandVkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas 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
VkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, and the current render pass instance was begun withCmdBeginRenderingwith aVkRenderingInfo::colorAttachmentCountparameter greater than 0, then each element of theVkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember ofVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created with aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pDepthAttachment\u2192pname:imageView was notNULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember ofVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pDepthAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created with aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pStencilAttachment\u2192pname:imageView was notNULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember ofVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pStencilAttachment\u2192pname:imageView - If the currently bound pipeline was created without a
VkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, and the current render pass instance was begun withCmdBeginRenderingwith aVkRenderingInfo::colorAttachmentCountparameter greater than 0, then each element of theVkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with a sample count equal to the value ofVkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created without aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pDepthAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pDepthAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created without aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pStencilAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pStencilAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline must have been created with aVkGraphicsPipelineCreateInfo::renderPassequal toNULL_HANDLE
- The bound graphics pipeline must not have been created with the
VkPipelineShaderStageCreateInfo::stagemember of an element ofVkGraphicsPipelineCreateInfo::pStagesset toSHADER_STAGE_VERTEX_BIT,SHADER_STAGE_TESSELLATION_CONTROL_BIT,SHADER_STAGE_TESSELLATION_EVALUATION_BITorSHADER_STAGE_GEOMETRY_BIT
- If
bufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject buffermust have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BITbit setoffsetmust be a multiple of 4commandBuffermust not be a protected command buffer
- If the multi-draw indirect feature is not enabled,
drawCountmust be 0 or 1 drawCountmust be less than or equal toVkPhysicalDeviceLimits::maxDrawIndirectCount- If
drawCountis greater than 1,stridemust be a multiple of 4 and must be greater than or equal tosizeof(VkDrawMeshTasksIndirectCommandNV) - If
drawCountis equal to 1,(offset + sizeof(must be less than or equal to the size ofVkDrawMeshTasksIndirectCommandNV))buffer - If
drawCountis greater than 1,(stride × (drawCount - 1) + offset + sizeof(must be less than or equal to the size ofVkDrawMeshTasksIndirectCommandNV))buffer
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlebuffermust be a validVkBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
- Both of
buffer, andcommandBuffermust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Primary Secondary Inside Graphics - Parameters:
commandBuffer- the command buffer into which the command is recorded.buffer- the buffer containing draw parameters.offset- the byte offset intobufferwhere 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(org.lwjgl.vulkan.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
vkCmdDrawMeshTasksIndirectCountNVbehaves similarly toCmdDrawMeshTasksIndirectNVexcept that the draw count is read by the device from a buffer during execution. The command will read an unsigned 32-bit integer fromcountBufferlocated atcountBufferOffsetand use this as the draw count.Valid Usage
- If a
VkSamplercreated withmagFilterorminFilterequal toFILTER_LINEARandcompareEnableequal toFALSEis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
VkSamplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toFALSEis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
VkImageViewis sampled with depth comparison, the image view’s format features must containFORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT - If a
VkImageViewis 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
VkImageViewis sampled withFILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT - Any
VkImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must have aVkImageViewTypeand format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 - Any
VkImageViewbeing sampled withFILTER_CUBIC_EXTwith a reduction mode of eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXas a result of this command must have aVkImageViewTypeand format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 - Any
VkImagecreated with aVkImageCreateInfo::flagscontainingIMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using aVkSamplerAddressModeofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE - Any
VkImageVieworVkBufferViewbeing written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT - Any
VkImageVieworVkBufferViewbeing read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For each set n that is statically used by the
VkPipelinebound 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 aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility - If the
maintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused 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 theVkPipelinebound 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
VkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, 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
VkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeIMAGE_VIEW_TYPE_3D,IMAGE_VIEW_TYPE_CUBE,IMAGE_VIEW_TYPE_1D_ARRAY,IMAGE_VIEW_TYPE_2D_ARRAYorIMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject 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
VkPipelineobject 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
VkPipelineobject 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
commandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by theVkPipelineobject bound to the pipeline bind point used by this command must not be a protected resource - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands - If a
VkImageViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format - If a
VkBufferViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the buffer view’s format - If a
VkImageViewwith aVkFormatthat has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 - If a
VkImageViewwith aVkFormatthat has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 - If a
VkBufferViewwith aVkFormatthat has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 - If a
VkBufferViewwith aVkFormatthat has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 - If the
sparseImageInt64Atomicsfeature is not enabled,VkImageobjects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If the
sparseImageInt64Atomicsfeature is not enabled,VkBufferobjects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - The current render pass must be compatible with the
renderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toPIPELINE_BIND_POINT_GRAPHICS - The subpass index of the current render pass must be equal to the
subpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toPIPELINE_BIND_POINT_GRAPHICS - Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
- 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 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::sampleLocationsEnableset toTRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theIMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, thenCmdSetViewportWithCountmust have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, thenCmdSetScissorWithCountmust have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline - If the bound graphics pipeline state was created with both the
DYNAMIC_STATE_SCISSOR_WITH_COUNTandDYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then bothCmdSetViewportWithCountandCmdSetScissorWithCountmust have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created withVkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTandDYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call toCmdSetViewportWScalingNVmust be greater than or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created withVkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTandDYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call toCmdSetViewportShadingRatePaletteNVmust be greater than or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and aVkPipelineViewportSwizzleStateCreateInfoNVstructure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created withVkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and aVkPipelineViewportExclusiveScissorStateCreateInfoNVstructure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created withVkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled thenCmdSetRasterizerDiscardEnablemust 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_ENABLEdynamic state enabled thenCmdSetDepthBiasEnablemust 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_EXTdynamic state enabled thenCmdSetLogicOpEXTmust have been called in the current command buffer prior to this drawing command and thelogicOpmust be a validVkLogicOpvalue - If the
primitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theDYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, thenCmdSetViewportWithCountmust have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be 1 - 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 theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beFALSE - If rasterization is not disabled in the bound graphics pipeline, and neither the
VK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, thenVkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments - If the current render pass instance was begun with
CmdBeginRendering, theimageViewmember ofpDepthAttachmentis notNULL_HANDLE, and thelayoutmember ofpDepthAttachmentisIMAGE_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, theimageViewmember ofpStencilAttachmentis notNULL_HANDLE, and thelayoutmember ofpStencilAttachmentisIMAGE_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, theimageViewmember ofpDepthAttachmentis notNULL_HANDLE, and thelayoutmember ofpDepthAttachmentisIMAGE_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, theimageViewmember ofpStencilAttachmentis notNULL_HANDLE, and thelayoutmember ofpStencilAttachmentisIMAGE_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, theimageViewmember ofpDepthAttachmentis notNULL_HANDLE, and thelayoutmember ofpDepthAttachmentisIMAGE_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, theimageViewmember ofpStencilAttachmentis notNULL_HANDLE, and thelayoutmember ofpStencilAttachmentisIMAGE_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 aVkPipelineRenderingCreateInfo::viewMaskequal toVkRenderingInfo::viewMask - If the current render pass instance was begun with
CmdBeginRendering, the currently bound graphics pipeline must have been created with aVkPipelineRenderingCreateInfo::colorAttachmentCountequal toVkRenderingInfo::colorAttachmentCount - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingInfo::colorAttachmentCountgreater than 0, then each element of theVkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with aVkFormatequal to the corresponding element ofVkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingInfo::pDepthAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to theVkFormatused to createVkRenderingInfo::pDepthAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingInfo::pStencilAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to theVkFormatused to createVkRenderingInfo::pStencilAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas 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
CmdBeginRenderingandVkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas 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
VkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, and the current render pass instance was begun withCmdBeginRenderingwith aVkRenderingInfo::colorAttachmentCountparameter greater than 0, then each element of theVkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember ofVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created with aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pDepthAttachment\u2192pname:imageView was notNULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember ofVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pDepthAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created with aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pStencilAttachment\u2192pname:imageView was notNULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember ofVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pStencilAttachment\u2192pname:imageView - If the currently bound pipeline was created without a
VkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, and the current render pass instance was begun withCmdBeginRenderingwith aVkRenderingInfo::colorAttachmentCountparameter greater than 0, then each element of theVkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with a sample count equal to the value ofVkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created without aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pDepthAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pDepthAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created without aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pStencilAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pStencilAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline must have been created with aVkGraphicsPipelineCreateInfo::renderPassequal toNULL_HANDLE
- The bound graphics pipeline must not have been created with the
VkPipelineShaderStageCreateInfo::stagemember of an element ofVkGraphicsPipelineCreateInfo::pStagesset toSHADER_STAGE_VERTEX_BIT,SHADER_STAGE_TESSELLATION_CONTROL_BIT,SHADER_STAGE_TESSELLATION_EVALUATION_BITorSHADER_STAGE_GEOMETRY_BIT
- If
bufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject buffermust have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BITbit setoffsetmust be a multiple of 4commandBuffermust not be a protected command buffer
- If
countBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject countBuffermust have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BITbit setcountBufferOffsetmust be a multiple of 4- The count stored in
countBuffermust be less than or equal toVkPhysicalDeviceLimits::maxDrawIndirectCount (countBufferOffset + sizeof(uint32_t))must be less than or equal to the size ofcountBuffer- If drawIndirectCount is not enabled this function must not be used
stridemust be a multiple of 4 and must be greater than or equal tosizeof(VkDrawMeshTasksIndirectCommandNV)- If
maxDrawCountis 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
countBufferis equal to 1,(offset + sizeof(must be less than or equal to the size ofVkDrawMeshTasksIndirectCommandNV))buffer - If the count stored in
countBufferis greater than 1,(stride × (drawCount - 1) + offset + sizeof(must be less than or equal to the size ofVkDrawMeshTasksIndirectCommandNV))buffer
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlebuffermust be a validVkBufferhandlecountBuffermust be a validVkBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
- Each of
buffer,commandBuffer, andcountBuffermust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Primary Secondary Inside Graphics - Parameters:
commandBuffer- the command buffer into which the command is recorded.buffer- the buffer containing draw parameters.offset- the byte offset intobufferwhere parameters begin.countBuffer- the buffer containing the draw count.countBufferOffset- the byte offset intocountBufferwhere 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 incountBufferandmaxDrawCount.stride- the byte stride between successive sets of draw parameters.
- If a
-
-