Validation Layer Details

VK_LAYER_LUNARG_standard_validation

VK_LAYER_LUNARG_standard_validation Overview

This is a meta-layer managed by the loader. On desktop systems, specifying this layer name will cause the loader to load the all of the standard validation layers in the following optimal order:

  • VK_LAYER_GOOGLE_threading
  • VK_LAYER_LUNARG_parameter_validation
  • VK_LAYER_LUNARG_object_tracker
  • VK_LAYER_LUNARG_image
  • VK_LAYER_LUNARG_core_validation
  • VK_LAYER_LUNARG_swapchain
  • VK_LAYER_GOOGLE_unique_objects

For platforms not using the standard loader (i.e., mobile platforms) the layers should be declared explicitly in the order shown above.

Other layers can be specified and the loader will remove duplicates. See the following individual layer descriptions for layer details.

VK_LAYER_LUNARG_core_validation

VK_LAYER_LUNARG_core_validation Overview

The VK_LAYER_LUNARG_core_validation layer is the main layer performing state tracking, object and state lifetime validation, and consistency and coherency between these states and the requirements, limits, and capabilities. Currently, it is divided into three main areas of validation: Draw State, Memory Tracking, and Shader Checking.

VK_LAYER_LUNARG_core_validation Draw State Details Table

The Draw State portion of the core validation layer tracks state leading into Draw commands. This includes the Pipeline state, dynamic state, shaders, and descriptor set state. This functionality validates the consistency and correctness between and within these states.

CheckOverviewENUM DRAWSTATE_*Relevant APITestnameNotes/TODO
Valid Pipeline LayoutsVerify that sets being bound are compatible with their PipelineLayout and that the last-bound PSO PipelineLayout at Draw time is compatible with all bound sets used by that PSOPIPELINE_LAYOUTS_INCOMPATIBLEvkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirectDescriptorSetCompatibilityNone
Valid BeginCommandBuffer stateMust not call Begin on command buffers that are being recorded, and primary command buffers must specify VK_NULL_HANDLE for RenderPass or Framebuffer parameters, while secondary command buffers must provide non-null parameters,BEGIN_CB_INVALID_STATEvkBeginCommandBufferCallBeginCommandBufferBeforeCompletion SecondaryCommandBufferNullRenderpassNone
Command Buffer Simultaneous UseViolation of VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT rules. Most likely attempting to simultaneously use a CmdBuffer w/o having that bit set. This also warns if you add secondary command buffer w/o that bit set to a primary command buffer that does have that bit set.INVALID_CB_SIMULTANEOUS_USEvkQueueSubmit vkCmdExecuteCommandsCommandBufferTwoSubmits SimultaneousUseNone
Valid Command Buffer ResetCan only reset individual command buffer that was allocated from a pool with VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT setINVALID_COMMAND_BUFFER_RESETvkBeginCommandBuffer vkResetCommandBufferCommandBufferResetErrorsNone
PSO BoundVerify that a properly created and valid pipeline object is bound to the CommandBuffer specified in these callsNO_PIPELINE_BOUNDvkCmdBindDescriptorSets vkCmdBindVertexBuffersPipelineNotBoundThis check is currently more related to VK_LAYER_LUNARG_core_validation internal data structures and less about verifying that PSO is bound at all appropriate points in API. For API purposes, need to make sure this is checked at Draw time and any other relevant calls.
Valid DescriptorSetValidate that descriptor set was properly created and is currently validINVALID_SETvkCmdBindDescriptorSetsInvalidDescriptorSetIs this needed other places (like Update/Clear descriptors)
Valid DescriptorSetLayoutFlag DescriptorSetLayout object that was not properly createdINVALID_LAYOUTvkAllocateDescriptorSetsInvalidDescriptorSetLayoutAnywhere else to check this?
Valid RenderAreaFlag renderArea field that is outside of the framebufferINVALID_RENDER_AREAvkCmdBeginRenderPassRenderPassInvalidRenderAreaAnywhere else to check this?
Valid PipelineFlag VkPipeline object that was not properly created, or case when Draw/Dispatch is bound to cmd buffer without a pipeline being boundINVALID_PIPELINEvkCmdBindPipelineInvalidPipelineNA
Valid SamplerFlag VkSampler object that was not properly created and/or is unknown.INVALID_SAMPLERvkQueueSubmitInvalidCmdBufferDescriptorSetImageSamplerDestroyedNA
Valid Pipeline Create InfoTests for the following: That compute shaders are not specified for the graphics pipeline, tess evaluation and tess control shaders are included or excluded as a pair, that VK_PRIMITIVE_TOPOLOGY_PATCH_LIST is set as IA topology for tessellation pipelines, that VK_PRIMITIVE_TOPOLOGY_PATCH_LIST primitive topology is only set for tessellation pipelines, and that Vtx Shader specifiedINVALID_PIPELINE_CREATE_STATEvkCreateGraphicsPipelinesInvalidPipelineCreateStateNA
Valid CommandBufferValidates that the command buffer object was properly created and is currently validINVALID_COMMAND_BUFFERvkQueueSubmit vkBeginCommandBuffer vkEndCommandBuffer vkCmdBindPipeline vkCmdBindDescriptorSets vkCmdBindIndexBuffer vkCmdBindVertexBuffers vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect vkCmdDispatch vkCmdDispatchIndirect vkCmdCopyBuffer vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdUpdateBuffer vkCmdFillBuffer vkCmdClearAttachments vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdResolveImage vkCmdSetEvent vkCmdResetEvent vkCmdWaitEvents vkCmdPipelineBarrier vkCmdBeginQuery vkCmdEndQuery vkCmdResetQueryPool vkCmdWriteTimestamp vkCmdBeginRenderPass vkCmdNextSubpass vkCmdEndRenderPass vkCmdExecuteCommands vkAllocateCommandBuffersInvalidCmdBufferBufferDestroyed InvalidCmdBufferImageDestroyed InvalidCmdBufferEventDestroyed InvalidCmdBufferQueryPoolDestroyed InvalidCmdBufferPipelineDestroyed ExecuteCommandsPrimaryCB InvalidCmdBufferDescriptorSetBufferDestroyed InvalidCmdBufferDescriptorSetImageSamplerDestroyedTODO - missing tests for 8 separate cases where this error is flagged. Cases are getCBNode(), 1st case in validateCmdsInCmdBuffer(), checkGraphicsBit(), checkComputeBit(), checkGraphicsOrComputeBit(), BeginCommandBuffer(), validatePrimaryCommandBuffer() and CmdExecuteCommands()
Vtx Buffer BoundsCheck if VBO index too large for PSO Vtx binding count, and that at least one vertex buffer is attached to pipeline objectVTX_INDEX_OUT_OF_BOUNDSvkCmdBindDescriptorSets vkCmdBindVertexBuffersVtxBufferBadIndexNA
Idx Buffer AlignmentVerify that offset of Index buffer falls on an alignment boundary as defined by IdxBufferAlignmentError paramVTX_INDEX_ALIGNMENT_ERRORvkCmdBindIndexBufferIdxBufferAlignmentErrorNA
Cmd Buffer EndVerifies that EndCommandBuffer was called for this commandBuffer at QueueSubmit timeNO_END_COMMAND_BUFFERvkQueueSubmitTODONA
Cmd Buffer BeginCheck that BeginCommandBuffer was called for this command buffer when binding commands or calling endNO_BEGIN_COMMAND_BUFFERvkEndCommandBuffer vkCmdBindPipeline vkCmdSetViewport vkCmdSetLineWidth vkCmdSetDepthBias vkCmdSetBlendConstants vkCmdSetDepthBounds vkCmdSetStencilCompareMask vkCmdSetStencilWriteMask vkCmdSetStencilReference vkCmdBindDescriptorSets vkCmdBindIndexBuffer vkCmdBindVertexBuffers vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect vkCmdDispatch vkCmdDispatchIndirect vkCmdCopyBuffer vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdUpdateBuffer vkCmdFillBuffer vkCmdClearAttachments vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdResolveImage vkCmdSetEvent vkCmdResetEvent vkCmdWaitEvents vkCmdPipelineBarrier vkCmdBeginQuery vkCmdEndQuery vkCmdResetQueryPool vkCmdWriteTimestampNoBeginCommandBufferNA
Cmd Buffer Submit CountVerify that ONE_TIME submit cmdbuffer is not submitted multiple timesCOMMAND_BUFFER_SINGLE_SUBMIT_VIOLATIONvkBeginCommandBuffer, vkQueueSubmitCommandBufferTwoSubmitsNA
Valid Secondary CommandBufferValidates that no primary command buffers are sent to vkCmdExecuteCommands() areINVALID_SECONDARY_COMMAND_BUFFERvkCmdExecuteCommandsExecuteCommandsPrimaryCBNA
Invalid Descriptor SetInvalid Descriptor Set used. Either never created or already destroyed.INVALID_DESCRIPTOR_SETvkQueueSubmit vkUpdateDescriptorSetsTODOCreate Tests as needed. Should also cross-check with object_tracker to see if any of these cases can be removed as redundant
Descriptor TypeVerify Descriptor type in bound descriptor set layout matches descriptor type specified in update. This also includes mismatches in the TYPES of copied descriptors.DESCRIPTOR_TYPE_MISMATCHvkUpdateDescriptorSetsDSTypeMismatch CopyDescriptorUpdateErrorsNA
Descriptor StageFlagsVerify all descriptors within a single write update have the same stageFlagsDESCRIPTOR_STAGEFLAGS_MISMATCHvkUpdateDescriptorSetsWriteDescriptorSetIntegrityCheck
DS Update SizeDS update out of bounds for given layout section.DESCRIPTOR_UPDATE_OUT_OF_BOUNDSvkUpdateDescriptorSetsDSUpdateOutOfBounds CopyDescriptorUpdateErrorsNA
Descriptor Pool emptyAttempt to allocate descriptor type from descriptor pool when no more of that type are available to be allocated.DESCRIPTOR_POOL_EMPTYvkAllocateDescriptorSetsAllocDescriptorFromEmptyPoolNA
Free from NON_FREE PoolIt's invalid to call vkFreeDescriptorSets() on Sets that were allocated from a Pool created with NON_FREE usage.CANT_FREE_FROM_NON_FREE_POOLvkFreeDescriptorSetsFreeDescriptorFromOneShotPoolNA
DS Write UpdateDS write update with invalid state which includes things like bad update objects, bad update sizes, and bad descriptor binding values.INVALID_WRITE_UPDATEvkUpdateDescriptorSetsInvalidDSUpdateIndex CopyDescriptorUpdateErrors DSUsageBitsErrors DSAspectBitsErrors DSBufferInfoErrorsNA
DS Copy UpdateDS copy update with invalid state such as bad object state, mis-matched descriptor types or a bad binding index.INVALID_COPY_UPDATEvkUpdateDescriptorSetsInvalidDSUpdateIndex CopyDescriptorUpdateErrors DSUsageBitsErrors DSAspectBitsErrorsNA
DS Update TypeVerifies that structs in DS Update tree are properly created, currently valid, and of the right typeINVALID_UPDATE_STRUCTvkUpdateDescriptorSetsInvalidDSUpdateStructNA
MSAA Sample CountVerifies that Draw-time, Pipeline, RenderPass, and Subpass sample counts are consistentNUM_SAMPLES_MISMATCHvkCmdBindPipeline vkCmdBeginRenderPass vkCmdNextSubpass vkCmdBlitImage vkCmdCopyImageToBuffer vkCmdCopyBufferToImageNumSamplesMismatch ImageSampleCountsNA
Dynamic Viewport State BindingVerify that viewport dynamic state bound to Cmd Buffer at Draw timeVIEWPORT_NOT_BOUNDvkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirectDynamicViewportNotBoundNA
Dynamic Scissor State BindingVerify that scissor dynamic state bound to Cmd Buffer at Draw timeSCISSOR_NOT_BOUNDvkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirectDynamicScissorNotBoundNA
Dynamic Line Width State BindingVerify that line width dynamic state bound to Cmd Buffer at draw time when requiredLINE_WIDTH_NOT_BOUNDvkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirectDynamicLineWidthNotBoundNA
Dynamic Depth Bias State BindingVerify that depth bias dynamic state bound when depth enabledDEPTH_BIAS_NOT_BOUNDvkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirectDynamicDepthBiasNotBoundNA
Dynamic Blend State BindingVerify that blend dynamic state bound when color blend enabledBLEND_NOT_BOUNDvkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirectDynamicBlendConstantsNotBoundNA
Dynamic Depth Bounds State BindingVerify that depth bounds dynamic state bound when depth enabledDEPTH_BOUNDS_NOT_BOUNDvkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirectDynamicDepthBoundsNotBoundNA
Dynamic Stencil State BindingVerify that stencil dynamic state bound when depth enabledSTENCIL_NOT_BOUNDvkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirectDynamicStencilReadNotBound DynamicStencilWriteNotBound DynamicStencilRefNotBoundNA
RenderPass misuseTests for the following: that vkCmdDispatch, vkCmdDispatchIndirect, vkCmdCopyBuffer, vkCmdCopyImage, vkCmdBlitImage, vkCmdCopyBufferToImage, vkCmdCopyImageToBuffer, vkCmdUpdateBuffer, vkCmdFillBuffer, vkCmdClearColorImage, vkCmdClearDepthStencilImage, vkCmdResolveImage, vkCmdSetEvent, vkCmdResetEvent, vkCmdResetQueryPool, vkCmdCopyQueryPoolResults, vkCmdBeginRenderPass, vkEndCommandBuffer are not called during an active Renderpass, and that binding compute descriptor sets or pipelines does not take place during an active RenderpassINVALID_RENDERPASS_CMDvkCmdBindPipeline vkCmdBindDescriptorSets vkCmdDispatch vkCmdDispatchIndirect vkCmdCopyBuffer vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdUpdateBuffer vkCmdFillBuffer vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdResolveImage vkCmdSetEvent vkCmdResetEvent vkCmdResetQueryPool vkCmdCopyQueryPoolResults vkCmdBeginRenderPass vkEndCommandBufferRenderPassWithinRenderPass UpdateBufferWithinRenderPass ClearColorImageWithinRenderPass ClearDepthStencilImageWithinRenderPass FillBufferWithinRenderPass EndCommandBufferWithinRenderPassNA
Correct use of RenderPassValidates that the following rendering commands are issued inside an active RenderPass: vkCmdDraw, vkCmdDrawIndexed, vkCmdDrawIndirect, vkCmdDrawIndexedIndirect, vkCmdClearAttachments, vkCmdNextSubpass, vkCmdEndRenderPassNO_ACTIVE_RENDERPASSvkCmdBindPipeline vkCmdBindDescriptorSets vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect vkCmdClearAttachments vkCmdNextSubpass vkCmdEndRenderPassClearColorAttachmentsOutsideRenderPassNA
Valid RenderPassFlag error if attempt made to Begin/End/Continue a NULL or otherwise invalid RenderPass objectINVALID_RENDERPASSvkCmdBeginRenderPass vkCmdEndRenderPass vkBeginCommandBufferNullRenderPassNA
RenderPass CompatibilityVerify that active renderpass is compatible with renderpass specified in secondary command buffer, and that renderpass specified for a framebuffer is compatible with renderpass specified in secondary command buffer. Also that parameters for BeginRenderpass are compatible with actual renderpass.RENDERPASS_INCOMPATIBLEvkCmdExecuteCommands vkBeginCommandBuffer vkCmdBeginRenderPass vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirectRenderPassClearOpMismatch RenderPassIncompatible FramebufferCreateErrorsNeed to write some more tests to cover all of these cases.
Framebuffer CompatibilityIf a framebuffer is passed to secondary command buffer in vkBeginCommandBuffer, then it must match active renderpass (if any) at time of vkCmdExecuteCommandsFRAMEBUFFER_INCOMPATIBLEvkCmdExecuteCommandsFramebufferIncompatibleNone
Framebuffer CreationIf a CreateFramebuffer is called with invalide CreateInfo such as attachments with bad mip levelCount or dimensionsINVALID_FRAMEBUFFER_CREATE_INFOvkCreateFramebufferFramebufferCreateErrorsNone
DescriptorSet UpdatedWarn user if DescriptorSet bound that was never updated and is not empty. Trigger error at draw time if a set being used was never updated.DESCRIPTOR_SET_NOT_UPDATEDvkCmdBindDescriptorSets vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirectDescriptorSetCompatibilityNA
DescriptorSet BoundError if DescriptorSet not bound that is used by currently bound VkPipeline at draw timeDESCRIPTOR_SET_NOT_BOUNDvkCmdBindDescriptorSetsDescriptorSetNotUpdatedNA
Dynamic Offset CountError if dynamicOffsetCount at CmdBindDescriptorSets time is not equal to the actual number of dynamic descriptors in all sets being bound.INVALID_DYNAMIC_OFFSET_COUNTvkCmdBindDescriptorSetsInvalidDynamicOffsetCasesNone
Dynamic OffsetsAt draw time, for a *_DYNAMIC type descriptor, the combination of dynamicOffset along with offset and range from its descriptor update must be less than the size of its buffer.DYNAMIC_OFFSET_OVERFLOWvkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirectInvalidDynamicOffsetCasesNone
Correct Clear UseWarn user if CmdClear for Color or DepthStencil issued to Cmd Buffer prior to a Draw Cmd. RenderPass LOAD_OP_CLEAR is preferred in this case.CLEAR_CMD_BEFORE_DRAWvkCmdClearColorImage vkCmdClearDepthStencilImageClearCmdNoDrawNA
Index Buffer BindingVerify that an index buffer is bound at the point when an indexed draw is attempted.INDEX_BUFFER_NOT_BOUNDvkCmdDrawIndexed vkCmdDrawIndexedIndirectIndexBufferNotBoundNA
Viewport and Scissors matchIn PSO viewportCount and scissorCount must match. Also for each count that is non-zero, there corresponding data array ptr should be non-NULL.VIEWPORT_SCISSOR_MISMATCHvkCreateGraphicsPipelines vkCmdSetViewport vkCmdSetScissorPSOViewportStateNotSet PSOViewportScissorCountMismatch PSOViewportCountWithoutDataAndDynScissorMismatch PSOScissorCountWithoutDataAndDynViewportMismatchNA
Valid Image Aspects for descriptor UpdatesWhen updating ImageView for Descriptor Sets with layout of DEPTH_STENCIL type, the Image Aspect must not have both the DEPTH and STENCIL aspects set, but must have one of the two set. For COLOR_ATTACHMENT, aspect must have COLOR_BIT set.INVALID_IMAGE_ASPECTvkUpdateDescriptorSetsDepthStencilImageViewWithColorAspectBitErrorThis test hits Image layer error, but tough to create case that skips that error and gets to VK_LAYER_LUNARG_core_validaton draw state error.
Valid sampler descriptor UpdatesAn invalid sampler is used when updating SAMPLER descriptor.SAMPLER_DESCRIPTOR_ERRORvkUpdateDescriptorSetsSampleDescriptorUpdateErrorCurrently only making sure sampler handle is known, can add further validation for sampler parameters
Immutable sampler update consistencyWithin a single write update, all sampler updates must use either immutable samplers or non-immutable samplers, but not a combination of both.INCONSISTENT_IMMUTABLE_SAMPLER_UPDATEvkUpdateDescriptorSetsWriteDescriptorSetIntegrityCheck
Valid imageView descriptor UpdatesAn invalid imageView is used when updating *_IMAGE or *_ATTACHMENT descriptor.IMAGEVIEW_DESCRIPTOR_ERRORvkUpdateDescriptorSetsImageViewDescriptorUpdateErrorCurrently only making sure imageView handle is known, can add further validation for imageView and underlying image parameters
Valid bufferView descriptor UpdatesAn invalid bufferView is used when updating *_TEXEL_BUFFER descriptor.BUFFERVIEW_DESCRIPTOR_ERRORvkUpdateDescriptorSetsInvalidBufferViewObjectCurrently only making sure bufferView handle is known, can add further validation for bufferView parameters
Valid bufferInfo descriptor UpdatesAn invalid bufferInfo is used when updating _UNIFORM_BUFFER or _STORAGE_BUFFER descriptor.BUFFERINFO_DESCRIPTOR_ERRORvkUpdateDescriptorSetsWriteDescriptorSetIntegrityCheck
Attachment References in SubpassAttachment reference must be present in active subpassMISSING_ATTACHMENT_REFERENCEvkCmdClearAttachmentsMissingClearAttachmentCurrently only making sure bufferInfo has buffer whose handle is known, can add further validation for bufferInfo parameters
Verify Image LayoutsValidate correct image layouts for presents, image transitions, command buffers and renderpassesINVALID_IMAGE_LAYOUTvkCreateRenderPass vkMapMemory vkQueuePresentKHR vkQueueSubmit vkCmdCopyImage vkCmdCopyImageToBuffer vkCmdWaitEvents VkCmdPipelineBarrierInvalidImageLayout MapMemWithoutHostVisibleBitNone
Verify Memory Access Flags/Memory BarriersValidate correct access flags for memory barriersINVALID_BARRIERvkCmdWaitEvents vkCmdPipelineBarrierInvalidBarriersNone
Verify Memory Buffer Not DeletedValidate Command Buffer not submitted with deleted memory bufferINVALID_BUFFERvkQueueSubmitVertexBufferInvalidNone
Verify Image Not DeletedValidate Command Buffer not submitted with deleted imageINVALID_IMAGEvkQueueSubmitTODOWrite test (or record here if we already have one)
Verify Query Pool Not DeletedValidate Command Buffer not submitted with deleted query poolINVALID_QUERY_POOLvkQueueSubmitTODOWrite test (or record here if we already have one)
Verify Memory Buffer DestroyValidate memory buffers are not destroyed more than onceDOUBLE_DESTROYvkDestroyBufferVertexBufferInvalidNone
Verify Object Not In UseValidate that object being freed or modified is not in useOBJECT_INUSEvkDestroyBuffer vkFreeDescriptorSets vkUpdateDescriptorSets vkDestroySemaphoreInUseDestroyedSignaled InvalidCmdBufferDescriptorSetImageSamplerDestroyedNA
Verify Get QueriesValidate that queries are properly setup, initialized and synchronizedINVALID_QUERYvkGetFenceStatus vkQueueWaitIdle vkWaitForFences vkDeviceWaitIdle vkCmdBeginQuery vkCmdEndQueryInvalidQueueIndexInvalidQueryMay need to check existing case against object_tracker and remove any redundant checks. Then write tests for remaining case. Currently there are 8 cases for this check with 1 each in cleanInFlightCmdBuffer(), EndCommandBuffer(), CmdEndQuery(), validateQuery(), and 4 cases in GetQueryPoolResults()
Verify Fences Not In UseValidate that fences are not used in multiple submit calls at the same timeINVALID_FENCEvkQueueSubmitTODOCurrently 3 cases of this check to be tested, 1 each in ValidateFenceForSubmit(), DestroyFence(), and ResetFences()
Verify Events Not In UseValidate that events are not used at the time they are destroyedINVALID_EVENTvkDestroyEventInUseDestroyedSignaledNone
Live SemaphoreWhen waiting on a semaphore, need to make sure that the semaphore is live and therefore can be signalled, otherwise queue is stalled and cannot make forward progress.QUEUE_FORWARD_PROGRESSvkQueueSubmit vkQueueBindSparse vkQueuePresentKHR vkAcquireNextImageKHRQueueForwardProgressFenceWaitNone
Buffer AlignmentBuffer memory offset in BindBufferMemory must agree with VkMemoryRequirements::alignment returned from a call to vkGetBufferMemoryRequirements with bufferINVALID_BUFFER_MEMORY_OFFSETvkBindBufferMemoryVertexBufferInvalidNone
Texel Buffer AlignmentStorage/Uniform Texel Buffer memory offset in BindBufferMemory must agree with offset alignment device limitINVALID_TEXEL_BUFFER_OFFSETvkBindBufferMemoryVertexBufferInvalidNone
Storage Buffer AlignmentStorage Buffer offsets in BindBufferMemory, BindDescriptorSets must agree with offset alignment device limitINVALID_STORAGE_BUFFER_OFFSETvkBindBufferMemory vkCmdBindDescriptorSetsVertexBufferInvalidNone
Uniform Buffer AlignmentUniform Buffer offsets in BindBufferMemory, BindDescriptorSets must agree with offset alignment device limitINVALID_UNIFORM_BUFFER_OFFSETvkBindBufferMemory vkCmdBindDescriptorSetsVertexBufferInvalidNone
Independent BlendingIf independent blending is not enabled, all elements of pAttachments must be identicalINDEPENDENT_BLENDvkCreateGraphicsPipelinesDisabledIndependentBlendCreate test
Enabled Logic OperationsIf logic operations is not enabled, logicOpEnable must be VK_FALSEDISABLED_LOGIC_OPvkCreateGraphicsPipelinesColorBlendLogicOpTestsNA
Valid Logic OperationsIf logicOpEnable is VK_TRUE, logicOp must be a valid VkLogicOp valueINVALID_LOGIC_OPvkCreateGraphicsPipelinesColorBlendLogicOpTestsNA
QueueFamilyIndex is ValidValidates that QueueFamilyIndices are less an the number of QueueFamiliesINVALID_QUEUE_INDEXvkCmdWaitEvents vkCmdPipelineBarrier vkCreateBuffer vkCreateImageInvalidQueueIndexInvalidQueryNA
Invalid Queue Family ConsistencyValidates that items created in one Queue Family are not submitted using a different oneINVALID_QUEUE_FAMILYvkCmdExecuteCommands vkQueueSubmitMismatchedQueueFamiliesOnSubmit
Push ConstantsValidate that the size of push constant ranges and updates does not exceed maxPushConstantSizePUSH_CONSTANTS_ERRORvkCreatePipelineLayout vkCmdPushConstantsInvalidPushConstantsNA
Attachment Image UsageValidate that Image attachment location does not conflict with the image's USAGE flagsINVALID_IMAGE_USAGEvkCreateFramebufferFramebufferCreateErrorsNA
Attachment Image IndexValidate that Image attachment references are appropriate and not out-of-boundsINVALID_ATTACHMENT_INDEXvkCreateRenderPass vkCreateFramebufferUnusedPreserveAttachmentNA
Image Transfer GranularityValidate that Image Transfer Granularity property settings are respected for image transfersIMAGE_TRANSFER_GRANULARITYvkCmdCopyImage vkCmdCopyImageToBuffer vkCmdCopyBufferToImageDSImageTransferGranularityTestsNA
NAEnum used for informational messagesNONETODONone
NAEnum used for errors in the layer itself. This does not indicate an app issue, but instead a bug in the layer.INTERNAL_ERRORTODONone
NAEnum used when VK_LAYER_LUNARG_core_validation attempts to allocate memory for its own internal use and is unable to.OUT_OF_MEMORYTODONone
Bad subpass indexingMust not step beyond last subpass in a renderpass instance, and must reach the last subpass before CmdEndRenderPass.INVALID_SUBPASS_INDEXvkCmdNextSubpassRenderPassExcessiveNextSubpassNA

VK_LAYER_LUNARG_core_validation Draw State Pending Work

See the Khronos github repository for Vulkan-LoaderAndValidationLayers for additional pending issues, or to submit new validation requests

VK_LAYER_LUNARG_core_validation Shader Checker Details Table

The Shader Checker portion of the VK_LAYER_LUNARG_core_validation layer inspects the SPIR-V shader images and fixed function pipeline stages at PSO creation time. It flags errors when inconsistencies are found across interfaces between shader stages. The exact behavior of the checksdepends on the pair of pipeline stages involved.

CheckOverviewENUM SHADER_CHECKER_*Relevant APITestnameNotes/TODO
Not consumedFlag warning if a location is not consumed (useless work)OUTPUT_NOT_CONSUMEDvkCreateGraphicsPipelinesCreatePipeline*NotConsumedNA
Not producedFlag error if a location is not produced (consumer reads garbage)INPUT_NOT_PRODUCEDvkCreateGraphicsPipelinesCreatePipeline*NotProvidedNA
Type mismatchFlag error if a location has inconsistent typesINTERFACE_TYPE_MISMATCHvkCreateGraphicsPipelinesCreatePipeline*TypeMismatchBetween shader stages, an exact structural type match is required. Between VI and VS, or between FS and CB, only the basic component type must match (float for UNORM/SNORM/FLOAT, int for SINT, uint for UINT) as the VI and CB stages perform conversions to the exact format.
Inconsistent shaderFlag error if an inconsistent SPIR-V image is detected. Possible cases include broken type definitions which the layer fails to walk.INCONSISTENT_SPIRVvkCreateGraphicsPipelinesTODOAll current tests use the reference compiler to produce valid SPIRV images from GLSL.
Non-SPIRV shaderFlag warning if a non-SPIR-V shader image is detected. This can occur if early drivers are ingesting GLSL. VK_LAYER_LUNARG_ShaderChecker cannot analyze non-SPIRV shaders, so this suppresses most other checks.NON_SPIRV_SHADERvkCreateGraphicsPipelinesTODONA
VI Binding DescriptionsValidate that there is a single vertex input binding description for each bindingINCONSISTENT_VIvkCreateGraphicsPipelinesCreatePipelineAttribBindingConflictNA
Shader Stage CheckWarns if shader stage is unsupportedUNKNOWN_STAGEvkCreateGraphicsPipelinesTODONA
Shader SpecializationError if specialization entry data is not fully contained within the specialization data block.BAD_SPECIALIZATIONvkCreateGraphicsPipelines vkCreateComputePipelinesTODONA
Missing DescriptorFlags error if shader attempts to use a descriptor binding not declared in the layoutMISSING_DESCRIPTORvkCreateGraphicsPipelinesCreatePipelineUniformBlockNotProvidedNA
Missing EntrypointFlags error if specified entrypoint is not present in the shader moduleMISSING_ENTRYPOINTvkCreateGraphicsPipelinesTODONA
Push constant out of rangeFlags error if a member of a push constant block is not contained within a push constant range specified in the pipeline layoutPUSH_CONSTANT_OUT_OF_RANGEvkCreateGraphicsPipelinesCreatePipelinePushConstantsNotInLayoutNA
Push constant not accessible from stageFlags error if the push constant range containing a push constant block member is not accessible from the current shader stage.PUSH_CONSTANT_NOT_ACCESSIBLE_FROM_STAGEvkCreateGraphicsPipelinesTODONA
Descriptor not accessible from stageFlags error if a descriptor used by a shader stage does not include that stage in its stageFlagsDESCRIPTOR_NOT_ACCESSIBLE_FROM_STAGEvkCreateGraphicsPipelinesTODONA
Descriptor type mismatchFlags error if a descriptor type does not match the shader resource type.DESCRIPTOR_TYPE_MISMATCHvkCreateGraphicsPipelinesTODONA
Feature not enabledFlags error if a capability declared by the shader requires a feature not enabled on the deviceFEATURE_NOT_ENABLEDvkCreateGraphicsPipelinesTODONA
Bad capabilityFlags error if a capability declared by the shader is not supported by Vulkan shadersBAD_CAPABILITYvkCreateGraphicsPipelinesTODONA
Missing input attachmentFlags error if shader consumes an input attachment which is not provided in the subpass in which a pipeline will be usedMISSING_INPUT_ATTACHMENTvkCreateGraphicsPipelinesCreatePipelineInputAttachment*NA
Input attachment type mismatchFlags error if shader's declaration of an input attachment has a type inconsistent with the format declared in the renderpassINPUT_ATTACHMENT_TYPE_MISMATCHvkCreateGraphicsPipelinesCreatePipelineInputAttachmentTypeMismatchNA
NAEnum used for informational messagesNONETODONone

VK_LAYER_LUNARG_core_validation Shader Checker Pending Work

See the Khronos github repository for Vulkan-LoaderAndValidationLayers for additional pending issues, or to submit new validation requests

VK_LAYER_LUNARG_core_validation Memory Tracker Details Table

The Mem Tracker portion of the VK_LAYER_LUNARG_core_validation layer tracks memory objects and references and validates that they are managed correctly by the application. This includes tracking object bindings, memory hazards, and memory object lifetimes. Several other hazard-related issues related to command buffers, fences, and memory mapping are also validated in this layer segment.

CheckOverviewENUM MEMTRACK_*Relevant APITestnameNotes/TODO
Valid Command BufferVerifies that the command buffer was properly created and is currently validINVALID_CBvkCmdBindPipeline vkCmdSetViewport vkCmdSetLineWidth vkCmdSetDepthBias vkCmdSetBlendConstants vkCmdSetDepthBounds vkCmdSetStencilCompareMask vkCmdSetStencilWriteMask vkCmdSetStencilReference vkBeginCommandBuffer vkResetCommandBuffer vkDestroyDevice vkFreeMemoryTODONA
Valid Memory ObjectVerifies that the memory object was properly created and is currently validINVALID_MEM_OBJvkCmdDrawIndirect vkCmdDrawIndexedIndirect vkCmdDispatchIndirect vkCmdCopyBuffer vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdUpdateBuffer vkCmdFillBuffer vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdResolveImage vkFreeMemory vkBindBufferMemory vkBindImageMemory vkQueueBindSparseVertexBufferInvalidNA
Memory AliasingFlag error if image and/or buffer memory binding ranges overlapINVALID_ALIASINGvkBindBufferMemory vkBindImageMemoryInvalidMemoryAliasingImplement test
Free Referenced MemoryChecks to see if memory being freed still has current referencesFREED_MEM_REFvmFreeMemoryTODONA
Valid ObjectVerifies that the specified Vulkan object was created properly and is currently validINVALID_OBJECTvkCmdBindPipeline vkCmdDrawIndirect vkCmdDrawIndexedIndirect vkCmdDispatchIndirect vkCmdCopyBuffer vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdUpdateBuffer vkCmdFillBuffer vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdResolveImageTODONA
Objects Not DestroyedVerify all objects destroyed at DestroyDevice timeMEMORY_LEAKvkDestroyDeviceTODONA
Memory Mapping StateVerifies that mapped memory is CPU-visibleINVALID_STATEvkMapMemoryMapMemWithoutHostVisibleBitNA
Command Buffer SynchronizationCommand Buffer must be complete before BeginCommandBuffer or ResetCommandBuffer can be calledRESET_CB_WHILE_IN_FLIGHTvkBeginCommandBuffer vkResetCommandBufferCallBeginCommandBufferBeforeCompletion CallBeginCommandBufferBeforeCompletionNA
Submitted Fence StatusVerifies that: The fence is not submitted in an already signaled state, that ResetFences is not called with a fence in an unsignaled state, and that fences being checked have been submittedINVALID_FENCE_STATEvkResetFences vkWaitForFences vkQueueSubmit vkGetFenceStatusSubmitSignaledFence ResetUnsignaledFence QueueForwardProgressFenceWaitNA
Immutable Memory BindingValidates that non-sparse memory bindings are immutable, so objects are not re-boundtREBIND_OBJECTvkBindBufferMemory, vkBindImageMemoryRebindMemoryNA
Image/Buffer Usage bitsVerify correct USAGE bits set based on how Images and Buffers are usedINVALID_USAGE_FLAGvkCreateImage, vkCreateBuffer, vkCreateBufferView, vkCmdCopyBuffer, vkCmdCopyQueryPoolResults, vkCmdCopyImage, vkCmdBlitImage, vkCmdCopyBufferToImage, vkCmdCopyImageToBuffer, vkCmdUpdateBuffer, vkCmdFillBufferInvalidUsageBitsNA
Memory Map Range ChecksValidates that Memory Mapping Requests are valid for the Memory Object (in-range, not currently mapped on Map, currently mapped on UnMap, size is non-zero)INVALID_MAPvkMapMemoryInvalidMemoryMappingNA
Memory Type Index ChecksValidates that specified memory type indices are validINVALID_MEM_TYPEvkBindImageMemory vkBindBufferMemoryTODONeed to fix up and re-enable BindImageInvalidMemoryType test as noted in comment in test
Memory Region ValidVerify that a portion of a memory allocation with a bound image or object has valid data.INVALID_MEM_REGIONvkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdResolveImage vkCmdBindIndexBuffer vkCmdBindVertexBuffers vkCmdCopyBuffer vkCmdBeginRenderPass vkQueuePresentKHR vkQueueSubmitTODOWrite tests for this case
Memory Bound To Object ChecksValidates that memory was bound to image or buffer before useOBJECT_NOT_BOUNDvkCreateImageView vkCreateBufferView vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdResolveImage vkCmdUpdateBuffer vkCmdFillBuffer vkCmdBindIndexBuffer vkCmdBindVertexBuffers vkCmdDrawIndirect vkCmdDrawIndexedIndirect vkCmdDispatchIndirect vkCmdCopyBuffer vkCmdCopyQueryPoolResultsCreateBufferViewNoMemoryBoundToBuffer CreateImageViewNoMemoryBoundToImage ImageMemoryNotBound BufferMemoryNotBoundNone
NAEnum used for informational messagesNONETODONone
NAEnum used for errors in the layer itself. This does not indicate an app issue, but instead a bug in the layer.INTERNAL_ERRORTODONone

VK_LAYER_LUNARG_core_validation Memory Tracker Pending Work and Enhancements

See the Khronos github repository for Vulkan-LoaderAndValidationLayers for additional pending issues, or to submit new validation requests

VK_LAYER_LUNARG_core_validation Memory Device Limits Details Table

Each device specifies a set of Device Limits with which the appropriate parameters should comply. The core_validation layer contains device-limits related checks for which some amount of saved state information is necessary to complete the check.

CheckOverviewENUM DEVLIMITS_*Relevant APITestnameNotes/TODO
Valid instanceIf an invalid instance is used, this error will be flaggedINVALID_INSTANCEvkEnumeratePhysicalDevicesTODOVK_LAYER_LUNARG_object_tracker should also catch this so if we made sure VK_LAYER_LUNARG_object_tracker was always on top, we could avoid this check
Valid physical deviceEnum used for informational messagesINVALID_PHYSICAL_DEVICEvkEnumeratePhysicalDevicesTODOVK_LAYER_LUNARG_object_tracker should also catch this so if we made sure VK_LAYER_LUNARG_object_tracker was always on top, we could avoid this check
Query count checkedSignifies that a query call such as vkEnumeratePhysicalDevices or vkGetPhysicalDeviceQueueFamilyProperties has been called without querying the countMISSING_QUERY_COUNTvkEnumeratePhysicalDevices vkGetPhysicalDeviceQueueFamilyPropertiesTODONone
Querying array countsFor API calls where an array count should be queried with an initial call and a NULL array pointer, verify that such a call was made before making a call with non-null array pointer.MUST_QUERY_COUNTvkEnumeratePhysicalDevices vkGetPhysicalDeviceQueueFamilyPropertiesTODOCreate focused test
Array count valueFor API calls where an array of details is queried, verify that the size of the requested array matches the size of the array supported by the device.COUNT_MISMATCHvkEnumeratePhysicalDevices vkGetPhysicalDeviceQueueFamilyPropertiesMismatchCountQueueCreateRequestedFeatureNA
Feature RequestAttempting to vkCreateDevice with a feature that is not supported by the underlying physical deviceINVALID_FEATURE_REQUESTEDvkCreateDeviceMismatchCountQueueCreateRequestedFeatureNA
Queue CreationWhen creating/requesting queues, make sure that QueueFamilyPropertiesIndex and index/count within that queue family are valid.INVALID_QUEUE_CREATE_REQUESTvkGetDeviceQueue vkCreateDeviceMismatchCountQueueCreateRequestedFeatureNA
NAEnum used for informational messagesNONETODONone

VK_LAYER_LUNARG_parameter_validation

VK_LAYER_LUNARG_parameter_validation Overview

The VK_LAYER_LUNARG_parameter_validation layer validates parameter values and flags errors for any values that are not consistent with the valid usage criteria defined for that parameter.

VK_LAYER_LUNARG_parameter_validation Details Table

CheckOverviewENUM *Relevant APITestnameNotes/TODO
Valid UsageVerifies that the value of a parameter is consistent with the valid usage criteria defined in the Vulkan specificationINVALID_USAGEvkCmdUpdateBuffer vkCmdFillBufferFillBufferAlignment UpdateBufferAlignmentNA
Valid VkStructureType ValueVerifies that the sType field of a Vulkan structure contains the value expected for a structure of that typeINVALID_STRUCT_STYPEInvalidStructSTypeNA
Valid Structure pNext ValueVerifies that the pNext field of a Vulkan structure references a value that is compatible with a structure of that type or is NULL when a structure of that type has no compatible pNext valuesINVALID_STRUCT_PNEXTInvalidStructPNextNA
Required ParameterVerifies that a required parameter was not specified as 0 or NULLREQUIRED_PARAMETERRequiredParameterNA
Reserved ParameterVerifies that a parameter reserved for future use was specified as 0 or NULLRESERVED_PARAMETERReservedParameterNA
Unrecognized ValueVerifies that a Vulkan enumeration, VkFlags, or VkBool32 parameter contains a value that is recognized as valid for that typeUNRECOGNIZED_VALUEUnrecognizedValueNA
Device Limit ViolationVerifies that a parameter is within the limits advertised by the gpuDEVICE_LIMITvkUpdateDescriptorSets vkCreateRenderPassTODONA
Device Feature ViolationVerifies that a requested feature is supported by the gpuDEVICE_FEATUREvkBeginCommandBuffer vkCreateGraphicsPipelinesPSOPolygonModeInvalidNA
Failed Call Return CodeProvides a description of a failure code returned by a Vulkan API callFAILURE_RETURN_CODEFailedReturnValueNA
NAEnum used for informational messagesNONETODONone

VK_LAYER_LUNARG_parameter_validation Pending Work

See the Khronos github repository for Vulkan-LoaderAndValidationLayers for additional pending issues, or to submit new validation requests

VK_LAYER_LUNARG_image

VK_LAYER_LUNARG_image Layer Overview

The VK_LAYER_LUNARG_image layer is responsible for validating format-related information and enforcing format restrictions.

VK_LAYER_LUNARG_image Layer Details Table

DETAILS TABLE PENDING

CheckOverviewENUM IMAGE_*Relevant APITestnameNotes/TODO
Image FormatVerifies that requested format is a supported Vulkan format on this deviceFORMAT_UNSUPPORTEDvkCreateImage vkCreateRenderPassImageLayerUnsupportedFormatNA
RenderPass AttachmentsValidates that attachment image format, layouts, loadOps, and storeOps are valid Vulkan valuesRENDERPASS_INVALID_ATTACHMENTvkCreateRenderPassAttachmentDescriptionUndefinedFormatTests are needed for loadops, storeops, layouts, and bad depth format
Subpass DS SettingsVerifies that if there is no depth attachment then the subpass attachment is set to VK_ATTACHMENT_UNUSEDRENDERPASS_INVALID_DS_ATTACHMENTvkCreateRenderPassRenderPassDepthStencilAttachmentUnusedNA
View CreationVerify that requested Image View Creation parameters are reasonable for the image that the view is being created forVIEW_CREATE_ERRORvkCreateImageViewImageLayerViewTestsNA
Image AspectsVerify that Image commands are using valid Image Aspect flagsINVALID_IMAGE_ASPECTvkCreateImageView vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdClearAttachments vkCmdCopyImage vkCmdCopyImageToBuffer vkCmdCopyBufferToImage vkCmdResolveImage vkCmdBlitImageInvalidImageViewAspectNA
Image Aspect MismatchVerify that Image commands with source and dest images use matching aspect flagsMISMATCHED_IMAGE_ASPECTvkCmdCopyImageMiscImageLayerTestsNA
Image Type MismatchVerify that Image commands with source and dest images use matching typesMISMATCHED_IMAGE_TYPEvkCmdCopyImage vkCmdResolveImageResolveImageTypeMismatchNA
Image Format MismatchVerify that Image commands with source and dest images use matching formatsMISMATCHED_IMAGE_FORMATvkCmdCopyImage vkCmdResolveImageCopyImageDepthStencilFormatMismatch ResolveImageFormatMismatchNA
Resolve Sample CountVerifies that source and dest images sample counts are validINVALID_RESOLVE_SAMPLESvkCmdResolveImageResolveImageHighSampleCount ResolveImageLowSampleCountNA
Verify FormatVerifies the formats are valid for this image operationINVALID_FORMATvkCreateImageView vkCmdBlitImageImageLayerViewTests ClearImageErrorsNA
Verify Correct Image FilterVerifies that specified filter is validINVALID_FILTERvkCmdBlitImageMiscImageLayerTestsNA
Verify Correct Image SettingsVerifies that values are valid for a given resource or subresourceINVALID_IMAGE_RESOURCEvkCmdPipelineBarrierMiscImageLayerTestsNA
Verify Image Format LimitsVerifies that image creation parameters are with the device format limitsINVALID_FORMAT_LIMITS_VIOLATIONvkCreateImageImageFormatLimitsNA
Verify LayoutVerifies the layouts are valid for this image operationINVALID_LAYOUTvkCreateImage vkCmdClearColorImageTODOImageFormatLimits
Verify Image ExtentsValidates that image extent limits are not invalidINVALID_EXTENTSvkCmdCopyImage vkCmdCopyBufferToImage vkCmdCopyImageToBufferMiscImageLayerTests CopyImageLayerCountMismatchNA
Verify UsageVerifies the image was created with usage valid for this image operationINVALID_USAGEvkCmdClearColorImageTODOClearImageErrors
NAEnum used for informational messagesNONETODONone

VK_LAYER_LUNARG_image Pending Work

See the Khronos github repository for Vulkan-LoaderAndValidationLayers for additional pending issues, or to submit new validation requests

VK_LAYER_LUNARG_object_tracker

VK_LAYER_LUNARG_object_tracker Overview

The VK_LAYER_LUNARG_object_tracker layer maintains a record of all Vulkan objects. It flags errors when invalid objects are used and at DestroyInstance time it flags any objects that were not properly destroyed.

VK_LAYER_LUNARG_object_tracker Details Table

CheckOverviewENUM OBJTRACK_*Relevant APITestnameNotes/TODO
Valid ObjectValidates that referenced object was properly created and is currently valid.INVALID_OBJECTvkAcquireNextImageKHR vkAllocateDescriptorSets vkAllocateMemory vkBeginCommandBuffer vkBindBufferMemory vkBindImageMemory vkCmdBeginQuery vkCmdBeginRenderPass vkCmdBindDescriptorSets vkCmdBindIndexBuffer vkCmdBindPipeline vkCmdBindVertexBuffers vkCmdBlitImage vkCmdClearAttachments vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdCopyBuffer vkCmdCopyBufferToImage vkCmdCopyImage vkCmdCopyImageToBuffer vkCmdCopyQueryPoolResults vkCmdDispatch vkCmdDispatchIndirect vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndexedIndirect vkCmdDrawIndirect vkCmdEndQuery vkCmdEndRenderPass vkCmdExecuteCommands vkCmdFillBuffer vkCmdNextSubpass vkCmdPipelineBarrier vkCmdPushConstants vkCmdResetEvent vkCmdResetQueryPool vkCmdResolveImage vkCmdSetEvent vkCmdUpdateBuffer vkCmdWaitEvents vkCmdWriteTimestamp vkCreateBuffer vkCreateBufferView vkAllocateCommandBuffers vkCreateCommandPool vkCreateComputePipelines vkCreateDescriptorPool vkCreateDescriptorSetLayout vkCreateEvent vkCreateFence vkCreateFramebuffer vkCreateGraphicsPipelines vkCreateImage vkCreateImageView vkCreatePipelineCache vkCreatePipelineLayout vkCreateQueryPool vkCreateRenderPass vkCreateSampler vkCreateSemaphore vkCreateShaderModule vkCreateSwapchainKHR vkDestroyBuffer vkDestroyBufferView vkFreeCommandBuffers vkDestroyCommandPool vkDestroyDescriptorPool vkDestroyDescriptorSetLayout vkDestroyEvent vkDestroyFence vkDestroyFramebuffer vkDestroyImage vkDestroyImageView vkDestroyPipeline vkDestroyPipelineCache vkDestroyPipelineLayout vkDestroyQueryPool vkDestroyRenderPass vkDestroySampler vkDestroySemaphore vkDestroyShaderModule vkDestroySwapchainKHR vkDeviceWaitIdle vkEndCommandBuffer vkEnumeratePhysicalDevices vkFreeDescriptorSets vkFreeMemory vkFreeMemory vkGetBufferMemoryRequirements vkGetDeviceMemoryCommitment vkGetDeviceQueue vkGetEventStatus vkGetFenceStatus vkGetImageMemoryRequirements vkGetImageSparseMemoryRequirements vkGetImageSubresourceLayout vkGetPhysicalDeviceSurfaceSupportKHR vkGetPipelineCacheData vkGetQueryPoolResults vkGetRenderAreaGranularity vkInvalidateMappedMemoryRanges vkMapMemory vkMergePipelineCaches vkQueueBindSparse vkResetCommandBuffer vkResetCommandPool vkResetDescriptorPool vkResetEvent vkResetFences vkSetEvent vkUnmapMemory vkUpdateDescriptorSets vkWaitForFencesBindInvalidMemory BindMemoryToDestroyedObject PipelineNotBoundEvery VkObject class of parameter will be run through this check. This check may ultimately supersede UNKNOWN_OBJECT
Objects LeakWhen an Instance or Device object is destroyed, validates that all objects belonging to that device/instance have previously been destroyedOBJECT_LEAKvkDestroyDevice vkDestroyInstanceLeakAnObjectNA
Unknown objectInternal layer errors when it attempts to update use count for an object that's not in its internal tracking datastructures.UNKNOWN_OBJECTCreateUnknownObjectNA
Correct Command PoolValidates that command buffers in a FreeCommandBuffers call were all created in the specified commandPoolCOMMAND_POOL_MISMATCHvkFreeCommandBuffersInvalidCommandPoolConsistencyNA
Correct Descriptor PoolValidates that descriptor sets in a FreeDescriptorSets call were all created in the specified descriptorPoolDESCRIPTOR_POOL_MISMATCHvkFreeDescriptorSetsInvalidDescriptorPoolConsistencyNA
NAEnum used for informational messagesNONETODONone
NAEnum used for errors in the layer itself. This does not indicate an app issue, but instead a bug in the layer.INTERNAL_ERRORTODONone

VK_LAYER_LUNARG_object_tracker Pending Work

See the Khronos github repository for Vulkan-LoaderAndValidationLayers for additional pending issues, or to submit new validation requests

VK_LAYER_GOOGLE_threading

VK_LAYER_GOOGLE_threading Overview

The VK_LAYER_GOOGLE_threading layer checks for simultaneous use of objects by calls from multiple threads. Application code is responsible for preventing simultaneous use of the same objects by certain calls that modify objects. See bug 13433 and https://cvs.khronos.org/svn/repos/oglc/trunk/nextgen/vulkan/function_properties.csv for threading rules. Objects that may need a mutex include VkQueue, VkDeviceMemory, VkObject, VkBuffer, VkImage, VkDescriptorSet, VkDescriptorPool, VkCommandBuffer, and VkSemaphore. The most common case is that a VkCommandBuffer passed to VkCmd* calls must be used by only one thread at a time.

In addition to reporting threading rule violations, the layer will enforce a mutex for those calls. That can allow an application to continue running without actually crashing due to the reported threading problem.

The layer can only observe when a mutual exclusion rule is actually violated. It cannot insure that there is no latent race condition needing mutual exclusion.

The layer can also catch reentrant use of the same object by calls from a single thread. That might happen if Vulkan calls are made from a callback function or a signal handler. But the layer cannot prevent such a reentrant use of an object.

The layer can only observe when a mutual exclusion rule is actually violated. It cannot insure that there is no latent race condition.

VK_LAYER_GOOGLE_threading Details Table

CheckOverviewENUM THREADING_CHECKER_*Relevant APITestnameNotes/TODO
Thread CollisionDetects and notifies user if multiple threads are modifying thes same objectMULTIPLE_THREADSvkQueueSubmit vkFreeMemory vkMapMemory vkUnmapMemory vkFlushMappedMemoryRanges vkInvalidateMappedMemoryRanges vkBindBufferMemory vkBindImageMemory vkQueueBindSparse vkDestroySemaphore vkDestroyBuffer vkDestroyImage vkDestroyDescriptorPool vkResetDescriptorPool vkAllocateDescriptorSets vkFreeDescriptorSets vkFreeCommandBuffers vkBeginCommandBuffer vkEndCommandBuffer vkResetCommandBuffer vkCmdBindPipeline vkCmdBindDescriptorSets vkCmdBindIndexBuffer vkCmdBindVertexBuffers vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect vkCmdDispatch vkCmdDispatchIndirect vkCmdCopyBuffer vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdUpdateBuffer vkCmdFillBuffer vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdClearAttachments vkCmdResolveImage vkCmdSetEvent vkCmdResetEvent vkCmdWaitEvents vkCmdPipelineBarrier vkCmdBeginQuery vkCmdEndQuery vkCmdResetQueryPool vkCmdWriteTimestamp vkCmdCopyQueryPoolResults vkCmdBeginRenderPass vkCmdNextSubpass vkCmdPushConstants vkCmdEndRenderPass vkCmdExecuteCommandsTODONA
Thread ReentrancyDetects cases of a single thread calling Vulkan reentrantlySINGLE_THREAD_REUSEvkQueueSubmit vkFreeMemory vkMapMemory vkUnmapMemory vkFlushMappedMemoryRanges vkInvalidateMappedMemoryRanges vkBindBufferMemory vkBindImageMemory vkQueueBindSparse vkDestroySemaphore vkDestroyBuffer vkDestroyImage vkDestroyDescriptorPool vkResetDescriptorPool vkAllocateDescriptorSets vkFreeDescriptorSets vkFreeCommandBuffers vkBeginCommandBuffer vkEndCommandBuffer vkResetCommandBuffer vkCmdBindPipeline vkCmdSetViewport vkCmdSetBlendConstants vkCmdSetLineWidth vkCmdSetDepthBias vkCmdSetDepthBounds vkCmdSetStencilCompareMask vkCmdSetStencilWriteMask vkCmdSetStencilReference vkCmdBindDescriptorSets vkCmdBindIndexBuffer vkCmdBindVertexBuffers vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect vkCmdDispatch vkCmdDispatchIndirect vkCmdCopyBuffer vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdUpdateBuffer vkCmdFillBuffer vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdClearAttachments vkCmdResolveImage vkCmdSetEvent vkCmdResetEvent vkCmdWaitEvents vkCmdPipelineBarrier vkCmdBeginQuery vkCmdEndQuery vkCmdResetQueryPool vkCmdWriteTimestamp vkCmdCopyQueryPoolResults vkCmdBeginRenderPass vkCmdNextSubpass vkCmdPushConstants vkCmdEndRenderPass vkCmdExecuteCommandsTODONA
NAEnum used for informational messagesNONETODONone

VK_LAYER_GOOGLE_threading Pending Work

See the Khronos github repository for Vulkan-LoaderAndValidationLayers for additional pending issues, or to submit new validation requests

VK_LAYER_LUNARG_swapchain

Swapchain Overview

This layer is a work in progress. VK_LAYER_LUNARG_swapchain layer is intended to ...

VK_LAYER_LUNARG_swapchain Details Table

CheckOverviewENUM SWAPCHAIN_*Relevant APITestnameNotes/TODO
Valid handleIf an invalid handle is used, this error will be flaggedINVALID_HANDLEvkCreateDevice vkCreateSwapchainKHRTODONone
Valid pointerIf a NULL pointer is used, this error will be flaggedNULL_POINTERvkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfacePresentModesKHR vkCreateSwapchainKHR vkGetSwapchainImagesKHR vkAcquireNextImageKHR vkQueuePresentKHRVkWsiEnabledLayerTest.TestEnabledWsiNone
Extension enabled before useValidates that a WSI extension is enabled before its functions are usedEXT_NOT_ENABLED_BUT_USEDvkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfacePresentModesKHR vkCreateSwapchainKHR vkDestroySwapchainKHR vkGetSwapchainImagesKHR vkAcquireNextImageKHR vkQueuePresentKHRVkLayerTest.EnableWsiBeforeUseNone
Swapchains destroyed before devicesValidates that vkDestroySwapchainKHR() is called for all swapchains associated with a device before vkDestroyDevice() is calledDEL_OBJECT_BEFORE_CHILDRENvkDestroyDevice vkDestroySurfaceKHRTODONone
Surface seen to support presentationValidates that pCreateInfo->surface was seen by vkGetPhysicalDeviceSurfaceSupportKHR() to support presentationCREATE_UNSUPPORTED_SURFACEvkCreateSwapchainKHRTODONone
Queries occur before swapchain creationValidates that vkGetPhysicalDeviceSurfaceCapabilitiesKHR(), vkGetPhysicalDeviceSurfaceFormatsKHR() and vkGetPhysicalDeviceSurfacePresentModesKHR() are called before vkCreateSwapchainKHR()CREATE_SWAP_WITHOUT_QUERYvkCreateSwapchainKHRVkWsiEnabledLayerTest.TestEnabledWsiNone
vkCreateSwapchainKHR(pCreateInfo->minImageCount)Validates vkCreateSwapchainKHR(pCreateInfo->minImageCount)CREATE_SWAP_BAD_MIN_IMG_COUNTvkCreateSwapchainKHRTODONone
vkCreateSwapchainKHR(pCreateInfo->imageExtent)Validates vkCreateSwapchainKHR(pCreateInfo->imageExtent) when window has no fixed sizeCREATE_SWAP_OUT_OF_BOUNDS_EXTENTSvkCreateSwapchainKHRTODONone
vkCreateSwapchainKHR(pCreateInfo->imageExtent)Validates vkCreateSwapchainKHR(pCreateInfo->imageExtent) when window has a fixed sizeCREATE_SWAP_EXTENTS_NO_MATCH_WINvkCreateSwapchainKHRTODONone
vkCreateSwapchainKHR(pCreateInfo->preTransform)Validates vkCreateSwapchainKHR(pCreateInfo->preTransform)CREATE_SWAP_BAD_PRE_TRANSFORMvkCreateSwapchainKHRTODONone
vkCreateSwapchainKHR(pCreateInfo->compositeAlpha)Validates vkCreateSwapchainKHR(pCreateInfo->compositeAlpha)CREATE_SWAP_BAD_COMPOSITE_ALPHAvkCreateSwapchainKHRTODONone
vkCreateSwapchainKHR(pCreateInfo->imageArrayLayers)Validates vkCreateSwapchainKHR(pCreateInfo->imageArrayLayers)CREATE_SWAP_BAD_IMG_ARRAY_LAYERSvkCreateSwapchainKHRTODONone
vkCreateSwapchainKHR(pCreateInfo->imageUsageFlags)Validates vkCreateSwapchainKHR(pCreateInfo->imageUsageFlags)CREATE_SWAP_BAD_IMG_USAGE_FLAGSvkCreateSwapchainKHRTODONone
vkCreateSwapchainKHR(pCreateInfo->imageColorSpace)Validates vkCreateSwapchainKHR(pCreateInfo->imageColorSpace)CREATE_SWAP_BAD_IMG_COLOR_SPACEvkCreateSwapchainKHRTODONone
vkCreateSwapchainKHR(pCreateInfo->imageFormat)Validates vkCreateSwapchainKHR(pCreateInfo->imageFormat)CREATE_SWAP_BAD_IMG_FORMATvkCreateSwapchainKHRTODONone
vkCreateSwapchainKHR(pCreateInfo->imageFormat and pCreateInfo->imageColorSpace)Validates vkCreateSwapchainKHR(pCreateInfo->imageFormat and pCreateInfo->imageColorSpace)CREATE_SWAP_BAD_IMG_FMT_CLR_SPvkCreateSwapchainKHRTODONone
vkCreateSwapchainKHR(pCreateInfo->presentMode)Validates vkCreateSwapchainKHR(pCreateInfo->presentMode)CREATE_SWAP_BAD_PRESENT_MODEvkCreateSwapchainKHRTODONone
vkCreateSwapchainKHR(pCreateInfo->imageSharingMode)Validates vkCreateSwapchainKHR(pCreateInfo->imageSharingMode)CREATE_SWAP_BAD_SHARING_MODEvkCreateSwapchainKHRVkWsiEnabledLayerTest.TestEnabledWsiNone
vkCreateSwapchainKHR(pCreateInfo->imageSharingMode)Validates vkCreateSwapchainKHR(pCreateInfo->imageSharingMode)CREATE_SWAP_BAD_SHARING_VALUESvkCreateSwapchainKHRVkWsiEnabledLayerTest.TestEnabledWsiNone
vkCreateSwapchainKHR(pCreateInfo->oldSwapchain and pCreateInfo->surface)pCreateInfo->surface must match pCreateInfo->oldSwapchain's surfaceCREATE_SWAP_DIFF_SURFACEvkCreateSwapchainKHRTODONone
Use same device for swapchainValidates that vkDestroySwapchainKHR() called with the same VkDevice as vkCreateSwapchainKHR()DESTROY_SWAP_DIFF_DEVICEvkCreateSwapchainKHR vkDestroySwapchainKHRTODONone
Don't acquire too many imagesValidates that app never tries to acquire too many swapchain images at a timeAPP_ACQUIRES_TOO_MANY_IMAGESvkAcquireNextImageKHRTODONone
Index too largeValidates that an image index is within the number of images in a swapchainINDEX_TOO_LARGEvkQueuePresentKHRVkWsiEnabledLayerTest.TestEnabledWsiNone
Can't present a non-owned imageValidates that application only presents images that it ownsINDEX_NOT_IN_USEvkQueuePresentKHRTODONone
A VkBool32 must have values of VK_TRUE or VK_FALSEValidates that a VkBool32 must have values of VK_TRUE or VK_FALSEBAD_BOOLvkCreateSwapchainKHRTODONone
pCount must be set by the API before the other pointer is non-NULLValidates that app queries for the value of pCount before trying to set itPRIOR_COUNTvkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfacePresentModesKHR vkGetSwapchainImagesKHRVkWsiEnabledLayerTest.TestEnabledWsiNone
pCount must point to same value regardless of whether other pointer is NULLValidates that app doesn't change value of pCount returned by a queryINVALID_COUNTvkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfacePresentModesKHR vkGetSwapchainImagesKHRVkWsiEnabledLayerTest.TestEnabledWsiNone
Valid sTypeValidates that a struct has correct value for sTypeWRONG_STYPEvkCreateSwapchainKHR vkQueuePresentKHRVkWsiEnabledLayerTest.TestEnabledWsiNone
Valid pNextValidates that a struct has NULL for the value of pNextWRONG_NEXTvkCreateSwapchainKHR vkQueuePresentKHRVkWsiEnabledLayerTest.TestEnabledWsiNone
Non-zero valueValidates that a required value should be non-zeroZERO_VALUEvkQueuePresentKHRTODONone
Compatible AllocatorValidates that pAllocator is compatible (i.e. NULL or not) when an object is created and destroyedINCOMPATIBLE_ALLOCATORvkDestroySurfaceKHRTODONone
Valid use of queueFamilyIndexValidates that a queueFamilyIndex not used before vkGetPhysicalDeviceQueueFamilyProperties() was calledDID_NOT_QUERY_QUEUE_FAMILIESvkGetPhysicalDeviceSurfaceSupportKHRTODONone
Valid queueFamilyIndex valueValidates that a queueFamilyIndex value is less-than pQueueFamilyPropertyCount returned by vkGetPhysicalDeviceQueueFamilyPropertiesQUEUE_FAMILY_INDEX_TOO_LARGEvkGetPhysicalDeviceSurfaceSupportKHRTODONone
Supported combination of queue and surfaceValidates that the surface associated with a swapchain was seen to support the queueFamilyIndex of a given queueSURFACE_NOT_SUPPORTED_WITH_QUEUEvkQueuePresentKHRTODONone
Proper synchronization of acquired imagesvkAcquireNextImageKHR should be called with a valid semaphore and/or fenceNO_SYNC_FOR_ACQUIREvkAcquireNextImageKHRTODONone
Potential use before queryValidates that Display Plane Properties are queried before getting supported Display PlanesGET_SUPPORTED_DISPLAYS_WITHOUT_QUERYvkGetPhysicalDeviceSurfaceSupportKHRTODOactually: vkGetDisplayPlaneSupportedDisplaysKHR
Index too largeValidates index is in range of phys device display plane propsPLANE_INDEX_TOO_LARGEvkGetPhysicalDeviceSurfaceSupportKHRTODOactually: vkGetDisplayPlaneSupportedDisplaysKHR
Index too largeValidates index is in range of phys device display plane propsPLANE_INDEX_TOO_LARGEvkGetPhysicalDeviceSurfaceSupportKHRTODOactually: vkGetDisplayPlaneCapabilitiesKHR

Note: The following platform-specific functions are not mentioned above, because they are protected by ifdefs, which cause test failures:

  • vkCreateAndroidSurfaceKHR
  • vkCreateMirSurfaceKHR
  • vkGetPhysicalDeviceMirPresentationSupportKHR
  • vkCreateWaylandSurfaceKHR
  • vkGetPhysicalDeviceWaylandPresentationSupportKHR
  • vkCreateWin32SurfaceKHR
  • vkGetPhysicalDeviceWin32PresentationSupportKHR
  • vkCreateXcbSurfaceKHR
  • vkGetPhysicalDeviceXcbPresentationSupportKHR
  • vkCreateXlibSurfaceKHR
  • vkGetPhysicalDeviceXlibPresentationSupportKHR

VK_LAYER_LUNARG_Swapchain Pending Work

See the Khronos github repository for Vulkan-LoaderAndValidationLayers for additional pending issues, or to submit new validation requests

VK_LAYER_GOOGLE_unique_objects

VK_LAYER_GOOGLE_unique_objects Overview

The unique_objects utility layer that assists with validation. The Vulkan specification allows objects to have non-unique handles. This makes tracking object lifetimes difficult in that it is unclear which object is being referenced upon deletion. The unique_objects layer addresses this by aliasing all objects with a unique identifier allowing proper object lifetime tracking. This layer does no validation on its own and may not be required for the proper operation of all layers or all platforms. One sign that it is needed is the appearance of many errors from the object_tracker layer indicating the use of previously destroyed objects. For optimal effectiveness this layer should be loaded last (to reside in the layer chain closest to the display driver and farthest from the application).