| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_EXT_multi_draw
Description
Name
VK_EXT_multi_draw - device extension
VK_EXT_multi_draw
- Name String
VK_EXT_multi_draw
- Extension Type
- Device extension
- Registered Extension Number
- 393
- Revision
- 1
- Extension and Version Dependencies
- Requires support for Vulkan 1.0
- Contact
Other Extension Metadata
- Last Modified Date
- 2021-05-19
- IP Status
- No known IP claims.
- Contributors
- Mike Blumenkrantz, VALVE
- Piers Daniell, NVIDIA
- Jason Ekstrand, INTEL
- Spencer Fricke, SAMSUNG
- Ricardo Garcia, IGALIA
- Jon Leech, KHRONOS
- Stu Smith, AMD
Description
Processing multiple draw commands in sequence incurs measurable overhead
within drivers due to repeated state checks and updates during dispatch.
This extension enables passing the entire sequence of draws directly to
the driver in order to avoid any such overhead, using an array of
MultiDrawInfoEXT or MultiDrawIndexedInfoEXT structs with
cmdDrawMultiEXT or cmdDrawMultiIndexedEXT, respectively. These
functions could be used any time multiple draw commands are being
recorded without any state changes between them in order to maximize
performance.
New Commands
New Structures
MultiDrawInfoEXTExtending
PhysicalDeviceFeatures2,DeviceCreateInfo:Extending
PhysicalDeviceProperties2:
New Enum Constants
EXT_MULTI_DRAW_SPEC_VERSIONExtending
StructureType:
New or Modified Built-In Variables
- (modified)
DrawIndex
Version History
Revision 1, 2021-01-20 (Mike Blumenkrantz)
- Initial version
See Also
MultiDrawIndexedInfoEXT, MultiDrawInfoEXT,
PhysicalDeviceMultiDrawFeaturesEXT,
PhysicalDeviceMultiDrawPropertiesEXT, cmdDrawMultiEXT,
cmdDrawMultiIndexedEXT
Document Notes
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- cmdDrawMultiEXT :: forall io. MonadIO io => CommandBuffer -> ("vertexInfo" ::: Vector MultiDrawInfoEXT) -> ("instanceCount" ::: Word32) -> ("firstInstance" ::: Word32) -> ("stride" ::: Word32) -> io ()
- cmdDrawMultiIndexedEXT :: forall io. MonadIO io => CommandBuffer -> ("indexInfo" ::: Vector MultiDrawIndexedInfoEXT) -> ("instanceCount" ::: Word32) -> ("firstInstance" ::: Word32) -> ("stride" ::: Word32) -> ("vertexOffset" ::: Maybe Int32) -> io ()
- data MultiDrawInfoEXT = MultiDrawInfoEXT {}
- data MultiDrawIndexedInfoEXT = MultiDrawIndexedInfoEXT {}
- data PhysicalDeviceMultiDrawPropertiesEXT = PhysicalDeviceMultiDrawPropertiesEXT {}
- data PhysicalDeviceMultiDrawFeaturesEXT = PhysicalDeviceMultiDrawFeaturesEXT {}
- type EXT_MULTI_DRAW_SPEC_VERSION = 1
- pattern EXT_MULTI_DRAW_SPEC_VERSION :: forall a. Integral a => a
- type EXT_MULTI_DRAW_EXTENSION_NAME = "VK_EXT_multi_draw"
- pattern EXT_MULTI_DRAW_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
Documentation
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> ("vertexInfo" ::: Vector MultiDrawInfoEXT) |
|
| -> ("instanceCount" ::: Word32) |
|
| -> ("firstInstance" ::: Word32) |
|
| -> ("stride" ::: Word32) |
|
| -> io () |
vkCmdDrawMultiEXT - Draw primitives
Description
drawCount draws are executed with parameters taken from pVertexInfo.
The number of draw commands recorded is drawCount, with each command
reading, sequentially, a firstVertex and a vertexCount from
pVertexInfo.
Valid Usage
- If a
Samplercreated withmagFilterorminFilterequal toFILTER_LINEARandcompareEnableequal toFALSEis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
Samplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toFALSEis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
ImageViewis sampled with depth comparison, the image view’s format features must containFORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT - If a
ImageViewis 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
ImageViewis 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
ImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must have aImageViewTypeand format that supports cubic filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned bygetPhysicalDeviceImageFormatProperties2 - Any
ImageViewbeing sampled withFILTER_CUBIC_EXTwith a reduction mode of eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXas a result of this command must have aImageViewTypeand format that supports cubic filtering together with minmax filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned bygetPhysicalDeviceImageFormatProperties2 - Any
Imagecreated with aImageCreateInfo::flagscontainingIMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using aSamplerAddressModeofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE - For any
ImageViewbeing written as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT - For any
ImageViewbeing read as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For any
BufferViewbeing written as a storage texel buffer where the image format field of theOpTypeImageisUnknown, the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT - Any
BufferViewbeing read as a storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For each set n that is
statically used by the
Pipelinebound 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 aPipelineLayoutthat is compatible for set n, with thePipelineLayoutused to create the currentPipeline, as described in ??? - If the
maintenance4
feature is not enabled, then for each push constant that is
statically used by the
Pipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aPipelineLayoutthat is compatible for push constants, with thePipelineLayoutused to create the currentPipeline, as described in ??? - Descriptors in each bound
descriptor set, specified via
cmdBindDescriptorSets, must be valid if they are statically used by thePipelinebound 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
Pipelineobject 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
Pipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound - If the
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyImagewith aImageViewof 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
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerobject 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
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage - If any stage of the
Pipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and the robustBufferAccess feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If any stage of the
Pipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and the robustBufferAccess feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If
commandBufferis an unprotected command buffer and protectedNoFault is not supported, any resource accessed by thePipelineobject bound to the pipeline bind point used by this command must not be a protected resource - If the
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerorImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions - If the
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerorImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands - If a
ImageViewis 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
BufferViewis 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
ImageViewwith aFormatthat 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
ImageViewwith aFormatthat 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
BufferViewwith aFormatthat 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
BufferViewwith aFormatthat 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
sparseImageInt64Atomics
feature is not enabled,
Imageobjects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If the
sparseImageInt64Atomics
feature is not enabled,
Bufferobjects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If
OpImageWeightedSampleQCOMis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM - If
OpImageWeightedSampleQCOMuses aImageViewas a sample weight image as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM - If
OpImageBoxFilterQCOMis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM - If
OpImageBlockMatchSSDQCOMis used to read from anImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM - If
OpImageBlockMatchSADQCOMis used to read from anImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM - If
OpImageBlockMatchSADQCOMor OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation. - If
OpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses aSampleras a result of this command, then the sampler must have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM. - If any
command other than
OpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses aSampleras a result of this command, then the sampler must not have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM. - Any shader invocation executed by this command must terminate
- The current render pass
must be
compatible
with the
renderPassmember of theGraphicsPipelineCreateInfostructure specified when creating thePipelinebound toPIPELINE_BIND_POINT_GRAPHICS - The subpass index of the
current render pass must be equal to the
subpassmember of theGraphicsPipelineCreateInfostructure specified when creating thePipelinebound 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 current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled
- If the current render pass
instance uses a depth/stencil attachment with a read-only layout
for the stencil aspect and stencil test is enabled,
all stencil ops
must be
STENCIL_OP_KEEP - If the draw
is recorded in a render pass instance with multiview enabled, the
maximum instance index must be less than or equal to
PhysicalDeviceMultiviewProperties::maxMultiviewInstanceIndex - If the bound
graphics pipeline was created with
PipelineSampleLocationsStateCreateInfoEXT::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_SAMPLE_LOCATIONS_EXTdynamic state enabled thencmdSetSampleLocationsEXTmust have been called in the current command buffer prior to this drawing command - If the bound graphics
pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_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 ofcmdSetViewportWithCountmust match thePipelineViewportStateCreateInfo::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 ofcmdSetScissorWithCountmust match thePipelineViewportStateCreateInfo::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 ofcmdSetViewportWithCountmust match thescissorCountparameter ofcmdSetScissorWithCount - 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 withPipelineViewportWScalingStateCreateInfoNV::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 withPipelineViewportShadingRateImageStateCreateInfoNV::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 aPipelineViewportSwizzleStateCreateInfoNVstructure chained fromPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created withPipelineViewportSwizzleStateCreateInfoNV::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 aPipelineViewportExclusiveScissorStateCreateInfoNVstructure chained fromPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created withPipelineViewportExclusiveScissorStateCreateInfoNV::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 validLogicOpvalue -
If the
primitiveFragmentShadingRateWithMultipleViewports
limit is not supported, the bound graphics pipeline was created with
the
DYNAMIC_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 ofcmdSetViewportWithCountmust be1 - If rasterization is not
disabled in the bound graphics pipeline, then for each color
attachment in the subpass, if the corresponding image view’s
format features
do not contain
FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beFALSE - If
rasterization is not disabled in the bound graphics pipeline, and
none of the
VK_AMD_mixed_attachment_samplesextension, theVK_NV_framebuffer_mixed_samplesextension, or the multisampledRenderToSingleSampled feature are enabled, thenPipelineMultisampleStateCreateInfo::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 aPipelineRenderingCreateInfo::viewMaskequal toRenderingInfo::viewMask - If the current
render pass instance was begun with
cmdBeginRendering, the currently bound graphics pipeline must have been created with aPipelineRenderingCreateInfo::colorAttachmentCountequal toRenderingInfo::colorAttachmentCount - If the current
render pass instance was begun with
cmdBeginRenderingandRenderingInfo::colorAttachmentCountgreater than0, then each element of theRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with aFormatequal to the corresponding element ofPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline - If the bound graphics
pipeline state was created with the
DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled thencmdSetColorWriteEnableEXTmust have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofcmdSetColorWriteEnableEXTmust be greater than or equal to thePipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline - If the bound graphics
pipeline state was created with the
DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled thencmdSetColorWriteEnableEXTmust have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofcmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofPhysicalDeviceLimits - If the current
render pass instance was begun with
cmdBeginRenderingandRenderingInfo::pDepthAttachment->imageViewwas notNULL_HANDLE, the value ofPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to theFormatused to createRenderingInfo::pDepthAttachment->imageView - If the current
render pass instance was begun with
cmdBeginRenderingandRenderingInfo::pStencilAttachment->imageViewwas notNULL_HANDLE, the value ofPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to theFormatused to createRenderingInfo::pStencilAttachment->imageView - If the current render pass
instance was begun with
cmdBeginRenderingandRenderingFragmentShadingRateAttachmentInfoKHR::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
cmdBeginRenderingandRenderingFragmentDensityMapAttachmentInfoEXT::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
AttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVstructure, and the current render pass instance was begun withcmdBeginRenderingwith aRenderingInfo::colorAttachmentCountparameter greater than0, then each element of theRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember ofAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline - If the current
render pass instance was begun with
cmdBeginRendering, the currently bound pipeline was created with aAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVstructure, andRenderingInfo::pDepthAttachment->imageViewwas notNULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember ofAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline must be equal to the sample count used to createRenderingInfo::pDepthAttachment->imageView - If the current
render pass instance was begun with
cmdBeginRendering, the currently bound pipeline was created with aAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVstructure, andRenderingInfo::pStencilAttachment->imageViewwas notNULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember ofAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline must be equal to the sample count used to createRenderingInfo::pStencilAttachment->imageView - If
the currently bound pipeline was created without a
AttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVstructure, and the multisampledRenderToSingleSampled feature is not enabled, and the current render pass instance was begun withcmdBeginRenderingwith aRenderingInfo::colorAttachmentCountparameter greater than0, then each element of theRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with a sample count equal to the value ofPipelineMultisampleStateCreateInfo::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 aAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVstructure, and the multisampledRenderToSingleSampled feature is not enabled, andRenderingInfo::pDepthAttachment->imageViewwas notNULL_HANDLE, the value ofPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to createRenderingInfo::pDepthAttachment->imageView - If
the current render pass instance was begun with
cmdBeginRendering, the currently bound pipeline was created without aAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVstructure, and the multisampledRenderToSingleSampled feature is not enabled, andRenderingInfo::pStencilAttachment->imageViewwas notNULL_HANDLE, the value ofPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to createRenderingInfo::pStencilAttachment->imageView - If the current render pass
instance was begun with
cmdBeginRendering, the currently bound pipeline must have been created with aGraphicsPipelineCreateInfo::renderPassequal toNULL_HANDLE -
If the
primitivesGeneratedQueryWithRasterizerDiscard
feature is not enabled and the
QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
If the
primitivesGeneratedQueryWithNonZeroStreams
feature is not enabled and the
QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream. - If the currently bound pipeline
was created with the
PipelineShaderStageCreateInfo::stagemember of an element ofGraphicsPipelineCreateInfo::pStagesset toSHADER_STAGE_VERTEX_BIT,SHADER_STAGE_TESSELLATION_CONTROL_BIT,SHADER_STAGE_TESSELLATION_EVALUATION_BITorSHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active - If
commandBufferis a protected command buffer and protectedNoFault is not supported, any resource written to by thePipelineobject bound to the pipeline bind point used by this command must not be an unprotected resource - If
commandBufferis a protected command buffer and protectedNoFault is not supported, pipeline stages other than the framebuffer-space and compute stages in thePipelineobject bound to the pipeline bind point used by this command must not write to any resource - If any of the shader
stages of the
Pipelinebound to the pipeline bind point used by this command uses the RayQueryKHR capability, thencommandBuffermust not be a protected command buffer - All vertex input bindings
accessed via vertex input variables declared in the vertex shader
entry point’s interface must have either valid or
NULL_HANDLEbuffers bound - If the
nullDescriptor
feature is not enabled, all vertex input bindings accessed via
vertex input variables declared in the vertex shader entry point’s
interface must not be
NULL_HANDLE - For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in ???
- If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXTdynamic state enabled thencmdSetPrimitiveTopologyEXTmust have been called in the current command buffer prior to this drawing command, and theprimitiveTopologyparameter ofcmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipelinePipelineInputAssemblyStateCreateInfo::topologystate - If the bound graphics pipeline
was created with both the
DYNAMIC_STATE_VERTEX_INPUT_EXTandDYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic states enabled, thencmdSetVertexInputEXTmust have been called in the current command buffer prior to this draw command - If the bound graphics
pipeline was created with the
DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic state enabled, but not theDYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, thencmdBindVertexBuffers2EXTmust have been called in the current command buffer prior to this draw command, and thepStridesparameter ofcmdBindVertexBuffers2EXTmust not beNULL - If the bound graphics pipeline
state was created with the
DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, thencmdSetVertexInputEXTmust have been called in the current command buffer prior to this draw command - If the bound graphics pipeline
state was created with the
DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTdynamic state enabled thencmdSetPatchControlPointsEXTmust have been called in the current command buffer prior to this drawing command - If the bound graphics pipeline
state was created with the
DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXTdynamic state enabled thencmdSetPrimitiveRestartEnableEXTmust have been called in the current command buffer prior to this drawing command - The bound graphics pipeline
must not have been created with the
PipelineShaderStageCreateInfo::stagemember of an element ofGraphicsPipelineCreateInfo::pStagesset toSHADER_STAGE_TASK_BIT_EXTorSHADER_STAGE_MESH_BIT_EXT - The multiDraw feature must be enabled
-
drawCountmust be less thanPhysicalDeviceMultiDrawPropertiesEXT::maxMultiDrawCount - If
drawCountis greater than zero,pVertexInfomust be a valid pointer to memory containing one or more valid instances ofMultiDrawInfoEXTstructures -
stridemust be a multiple of 4
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Inside | Outside | Graphics | Action |
See Also
cmdDrawMultiIndexedEXT Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> ("indexInfo" ::: Vector MultiDrawIndexedInfoEXT) |
|
| -> ("instanceCount" ::: Word32) |
|
| -> ("firstInstance" ::: Word32) |
|
| -> ("stride" ::: Word32) |
|
| -> ("vertexOffset" ::: Maybe Int32) |
|
| -> io () |
vkCmdDrawMultiIndexedEXT - Draw primitives
Description
drawCount indexed draws are executed with parameters taken from
pIndexInfo. The number of draw commands recorded is drawCount, with
each command reading, sequentially, a firstIndex and an indexCount
from pIndexInfo. If pVertexOffset is NULL, a vertexOffset is
also read from pIndexInfo, otherwise the value from dereferencing
pVertexOffset is used.
Valid Usage
- If a
Samplercreated withmagFilterorminFilterequal toFILTER_LINEARandcompareEnableequal toFALSEis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
Samplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toFALSEis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
ImageViewis sampled with depth comparison, the image view’s format features must containFORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT - If a
ImageViewis 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
ImageViewis 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
ImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must have aImageViewTypeand format that supports cubic filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned bygetPhysicalDeviceImageFormatProperties2 - Any
ImageViewbeing sampled withFILTER_CUBIC_EXTwith a reduction mode of eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXas a result of this command must have aImageViewTypeand format that supports cubic filtering together with minmax filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned bygetPhysicalDeviceImageFormatProperties2 - Any
Imagecreated with aImageCreateInfo::flagscontainingIMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using aSamplerAddressModeofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE - For any
ImageViewbeing written as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT - For any
ImageViewbeing read as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For any
BufferViewbeing written as a storage texel buffer where the image format field of theOpTypeImageisUnknown, the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT - Any
BufferViewbeing read as a storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For each set n that is
statically used by the
Pipelinebound 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 aPipelineLayoutthat is compatible for set n, with thePipelineLayoutused to create the currentPipeline, as described in ??? - If the
maintenance4
feature is not enabled, then for each push constant that is
statically used by the
Pipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aPipelineLayoutthat is compatible for push constants, with thePipelineLayoutused to create the currentPipeline, as described in ??? - Descriptors in each bound
descriptor set, specified via
cmdBindDescriptorSets, must be valid if they are statically used by thePipelinebound 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
Pipelineobject 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
Pipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound - If the
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyImagewith aImageViewof 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
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerobject 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
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage - If any stage of
the
Pipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and the robustBufferAccess feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If any stage of
the
Pipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and the robustBufferAccess feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If
commandBufferis an unprotected command buffer and protectedNoFault is not supported, any resource accessed by thePipelineobject bound to the pipeline bind point used by this command must not be a protected resource - If the
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerorImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions - If the
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerorImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands - If a
ImageViewis 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
BufferViewis 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
ImageViewwith aFormatthat 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
ImageViewwith aFormatthat 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
BufferViewwith aFormatthat 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
BufferViewwith aFormatthat 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
sparseImageInt64Atomics
feature is not enabled,
Imageobjects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If the
sparseImageInt64Atomics
feature is not enabled,
Bufferobjects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If
OpImageWeightedSampleQCOMis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM - If
OpImageWeightedSampleQCOMuses aImageViewas a sample weight image as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM - If
OpImageBoxFilterQCOMis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM - If
OpImageBlockMatchSSDQCOMis used to read from anImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM - If
OpImageBlockMatchSADQCOMis used to read from anImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM - If
OpImageBlockMatchSADQCOMor OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation. - If
OpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses aSampleras a result of this command, then the sampler must have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM. - If
any command other than
OpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses aSampleras a result of this command, then the sampler must not have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM. - Any shader invocation executed by this command must terminate
- The current render
pass must be
compatible
with the
renderPassmember of theGraphicsPipelineCreateInfostructure specified when creating thePipelinebound toPIPELINE_BIND_POINT_GRAPHICS - The subpass index of
the current render pass must be equal to the
subpassmember of theGraphicsPipelineCreateInfostructure specified when creating thePipelinebound 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 current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled
- If the current render
pass instance uses a depth/stencil attachment with a read-only
layout for the stencil aspect and stencil test is enabled,
all stencil ops
must be
STENCIL_OP_KEEP - If
the draw is recorded in a render pass instance with multiview
enabled, the maximum instance index must be less than or equal to
PhysicalDeviceMultiviewProperties::maxMultiviewInstanceIndex - If the
bound graphics pipeline was created with
PipelineSampleLocationsStateCreateInfoEXT::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_SAMPLE_LOCATIONS_EXTdynamic state enabled thencmdSetSampleLocationsEXTmust have been called in the current command buffer prior to this drawing command - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_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 ofcmdSetViewportWithCountmust match thePipelineViewportStateCreateInfo::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 ofcmdSetScissorWithCountmust match thePipelineViewportStateCreateInfo::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 ofcmdSetViewportWithCountmust match thescissorCountparameter ofcmdSetScissorWithCount - 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 withPipelineViewportWScalingStateCreateInfoNV::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 withPipelineViewportShadingRateImageStateCreateInfoNV::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 aPipelineViewportSwizzleStateCreateInfoNVstructure chained fromPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created withPipelineViewportSwizzleStateCreateInfoNV::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 aPipelineViewportExclusiveScissorStateCreateInfoNVstructure chained fromPipelineViewportStateCreateInfo, then the bound graphics pipeline must have been created withPipelineViewportExclusiveScissorStateCreateInfoNV::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 validLogicOpvalue -
If the
primitiveFragmentShadingRateWithMultipleViewports
limit is not supported, the bound graphics pipeline was created with
the
DYNAMIC_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 ofcmdSetViewportWithCountmust be1 - If rasterization
is not disabled in the bound graphics pipeline, then for each color
attachment in the subpass, if the corresponding image view’s
format features
do not contain
FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beFALSE -
If rasterization is not disabled in the bound graphics pipeline, and
none of the
VK_AMD_mixed_attachment_samplesextension, theVK_NV_framebuffer_mixed_samplesextension, or the multisampledRenderToSingleSampled feature are enabled, thenPipelineMultisampleStateCreateInfo::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 aPipelineRenderingCreateInfo::viewMaskequal toRenderingInfo::viewMask - If the
current render pass instance was begun with
cmdBeginRendering, the currently bound graphics pipeline must have been created with aPipelineRenderingCreateInfo::colorAttachmentCountequal toRenderingInfo::colorAttachmentCount - If the
current render pass instance was begun with
cmdBeginRenderingandRenderingInfo::colorAttachmentCountgreater than0, then each element of theRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with aFormatequal to the corresponding element ofPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled thencmdSetColorWriteEnableEXTmust have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofcmdSetColorWriteEnableEXTmust be greater than or equal to thePipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled thencmdSetColorWriteEnableEXTmust have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofcmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofPhysicalDeviceLimits - If the
current render pass instance was begun with
cmdBeginRenderingandRenderingInfo::pDepthAttachment->imageViewwas notNULL_HANDLE, the value ofPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to theFormatused to createRenderingInfo::pDepthAttachment->imageView - If the
current render pass instance was begun with
cmdBeginRenderingandRenderingInfo::pStencilAttachment->imageViewwas notNULL_HANDLE, the value ofPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to theFormatused to createRenderingInfo::pStencilAttachment->imageView - If the current
render pass instance was begun with
cmdBeginRenderingandRenderingFragmentShadingRateAttachmentInfoKHR::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
cmdBeginRenderingandRenderingFragmentDensityMapAttachmentInfoEXT::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
AttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVstructure, and the current render pass instance was begun withcmdBeginRenderingwith aRenderingInfo::colorAttachmentCountparameter greater than0, then each element of theRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember ofAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline - If the
current render pass instance was begun with
cmdBeginRendering, the currently bound pipeline was created with aAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVstructure, andRenderingInfo::pDepthAttachment->imageViewwas notNULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember ofAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline must be equal to the sample count used to createRenderingInfo::pDepthAttachment->imageView - If the
current render pass instance was begun with
cmdBeginRendering, the currently bound pipeline was created with aAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVstructure, andRenderingInfo::pStencilAttachment->imageViewwas notNULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember ofAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline must be equal to the sample count used to createRenderingInfo::pStencilAttachment->imageView -
If the currently bound pipeline was created without a
AttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVstructure, and the multisampledRenderToSingleSampled feature is not enabled, and the current render pass instance was begun withcmdBeginRenderingwith aRenderingInfo::colorAttachmentCountparameter greater than0, then each element of theRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with a sample count equal to the value ofPipelineMultisampleStateCreateInfo::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 aAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVstructure, and the multisampledRenderToSingleSampled feature is not enabled, andRenderingInfo::pDepthAttachment->imageViewwas notNULL_HANDLE, the value ofPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to createRenderingInfo::pDepthAttachment->imageView -
If the current render pass instance was begun with
cmdBeginRendering, the currently bound pipeline was created without aAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVstructure, and the multisampledRenderToSingleSampled feature is not enabled, andRenderingInfo::pStencilAttachment->imageViewwas notNULL_HANDLE, the value ofPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to createRenderingInfo::pStencilAttachment->imageView - If the current
render pass instance was begun with
cmdBeginRendering, the currently bound pipeline must have been created with aGraphicsPipelineCreateInfo::renderPassequal toNULL_HANDLE -
If the
primitivesGeneratedQueryWithRasterizerDiscard
feature is not enabled and the
QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
If the
primitivesGeneratedQueryWithNonZeroStreams
feature is not enabled and the
QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream. - If the currently bound
pipeline was created with the
PipelineShaderStageCreateInfo::stagemember of an element ofGraphicsPipelineCreateInfo::pStagesset toSHADER_STAGE_VERTEX_BIT,SHADER_STAGE_TESSELLATION_CONTROL_BIT,SHADER_STAGE_TESSELLATION_EVALUATION_BITorSHADER_STAGE_GEOMETRY_BIT, then Mesh Shader Queries must not be active - If
commandBufferis a protected command buffer and protectedNoFault is not supported, any resource written to by thePipelineobject bound to the pipeline bind point used by this command must not be an unprotected resource - If
commandBufferis a protected command buffer and protectedNoFault is not supported, pipeline stages other than the framebuffer-space and compute stages in thePipelineobject bound to the pipeline bind point used by this command must not write to any resource - If any of the
shader stages of the
Pipelinebound to the pipeline bind point used by this command uses the RayQueryKHR capability, thencommandBuffermust not be a protected command buffer - All vertex input bindings
accessed via vertex input variables declared in the vertex shader
entry point’s interface must have either valid or
NULL_HANDLEbuffers bound - If the
nullDescriptor
feature is not enabled, all vertex input bindings accessed via
vertex input variables declared in the vertex shader entry point’s
interface must not be
NULL_HANDLE - For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in ???
- If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXTdynamic state enabled thencmdSetPrimitiveTopologyEXTmust have been called in the current command buffer prior to this drawing command, and theprimitiveTopologyparameter ofcmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipelinePipelineInputAssemblyStateCreateInfo::topologystate - If the bound graphics
pipeline was created with both the
DYNAMIC_STATE_VERTEX_INPUT_EXTandDYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic states enabled, thencmdSetVertexInputEXTmust have been called in the current command buffer prior to this draw command - If the bound graphics
pipeline was created with the
DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic state enabled, but not theDYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, thencmdBindVertexBuffers2EXTmust have been called in the current command buffer prior to this draw command, and thepStridesparameter ofcmdBindVertexBuffers2EXTmust not beNULL - If the bound graphics
pipeline state was created with the
DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, thencmdSetVertexInputEXTmust have been called in the current command buffer prior to this draw command - If the bound graphics
pipeline state was created with the
DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTdynamic state enabled thencmdSetPatchControlPointsEXTmust have been called in the current command buffer prior to this drawing command - If the bound graphics
pipeline state was created with the
DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXTdynamic state enabled thencmdSetPrimitiveRestartEnableEXTmust have been called in the current command buffer prior to this drawing command - The bound graphics
pipeline must not have been created with the
PipelineShaderStageCreateInfo::stagemember of an element ofGraphicsPipelineCreateInfo::pStagesset toSHADER_STAGE_TASK_BIT_EXTorSHADER_STAGE_MESH_BIT_EXT - An index buffer must be bound
- The multiDraw feature must be enabled
- (
indexSize× (firstIndex+indexCount) +offset) must be less than or equal to the size of the bound index buffer, withindexSizebeing based on the type specified byindexType, where the index buffer,indexType, andoffsetare specified viacmdBindIndexBuffer -
drawCountmust be less thanPhysicalDeviceMultiDrawPropertiesEXT::maxMultiDrawCount - If
drawCountis greater than zero,pIndexInfomust be a valid pointer to memory containing one or more valid instances ofMultiDrawIndexedInfoEXTstructures -
stridemust be a multiple of 4
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
- If
pVertexOffsetis notNULL,pVertexOffsetmust be a valid pointer to a validint32_tvalue -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Inside | Outside | Graphics | Action |
See Also
data MultiDrawInfoEXT Source #
VkMultiDrawInfoEXT - Structure specifying a multi-draw command
Description
The members of MultiDrawInfoEXT have the same meaning as the
firstVertex and vertexCount parameters in
cmdDraw.
See Also
Constructors
| MultiDrawInfoEXT | |
Fields
| |
Instances
data MultiDrawIndexedInfoEXT Source #
VkMultiDrawIndexedInfoEXT - Structure specifying a multi-draw command
Description
The firstIndex, indexCount, and vertexOffset members of
MultiDrawIndexedInfoEXT have the same meaning as the firstIndex,
indexCount, and vertexOffset parameters, respectively, of
cmdDrawIndexed.
See Also
Constructors
| MultiDrawIndexedInfoEXT | |
Fields
| |
Instances
data PhysicalDeviceMultiDrawPropertiesEXT Source #
VkPhysicalDeviceMultiDrawPropertiesEXT - Structure describing multidraw limits of an implementation
Members
The members of the PhysicalDeviceMultiDrawPropertiesEXT structure
describe the following features:
Description
If the PhysicalDeviceMultiDrawPropertiesEXT structure is included in
the pNext chain of the
PhysicalDeviceProperties2
structure passed to
getPhysicalDeviceProperties2,
it is filled in with each corresponding implementation-dependent
property.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceMultiDrawPropertiesEXT | |
Fields | |
Instances
data PhysicalDeviceMultiDrawFeaturesEXT Source #
VkPhysicalDeviceMultiDrawFeaturesEXT - Structure describing whether the implementation supports multi draw functionality
Members
This structure describes the following features:
Description
If the PhysicalDeviceMultiDrawFeaturesEXT structure is included in the
pNext chain of the
PhysicalDeviceFeatures2
structure passed to
getPhysicalDeviceFeatures2,
it is filled in to indicate whether each corresponding feature is
supported. PhysicalDeviceMultiDrawFeaturesEXT can also be used in
the pNext chain of DeviceCreateInfo to
selectively enable these features.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceMultiDrawFeaturesEXT | |
Fields
| |
Instances
type EXT_MULTI_DRAW_SPEC_VERSION = 1 Source #
pattern EXT_MULTI_DRAW_SPEC_VERSION :: forall a. Integral a => a Source #
type EXT_MULTI_DRAW_EXTENSION_NAME = "VK_EXT_multi_draw" Source #
pattern EXT_MULTI_DRAW_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #