blob: beb4413c2e7ca118564fac3f6d2af956af852964 [file] [log] [blame] [view]
Tobin Ehlisa77845b2015-08-25 09:56:38 -06001[TOC]
2
Jens Owenef5b8ed2015-08-25 12:29:34 -04003# Validation Layer Details
Tobin Ehlisa77845b2015-08-25 09:56:38 -06004
Jens Owenef5b8ed2015-08-25 12:29:34 -04005## DrawState
Tobin Ehlisa77845b2015-08-25 09:56:38 -06006
Jens Owenef5b8ed2015-08-25 12:29:34 -04007### DrawState Overview
Tobin Ehlisa77845b2015-08-25 09:56:38 -06008
9The DrawState layer tracks state leading into Draw cmds. This includes the Pipeline state, dynamic state, and descriptor set state. DrawState validates the consistency and correctness between and within these states.
10
Jens Owenef5b8ed2015-08-25 12:29:34 -040011### DrawState Details Table
Tobin Ehlisa77845b2015-08-25 09:56:38 -060012
13| Check | Overview | ENUM DRAWSTATE_* | Relevant API | Testname | Notes/TODO |
14| ----- | -------- | ---------------- | ------------ | -------- | ---------- |
15| Valid Pipeline Layouts | Validates that pipeline layout from bound descriptor set matches the current pipeline layout | PIPELINE_LAYOUT_MISMATCH | vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect | TBD | None |
Tobin Ehlis236717c2015-08-31 12:42:38 -060016| Validate DbgMarker exensions | Validates that DbgMarker extensions have been enabled before use | INVALID_EXTENSION | vkCmdDbgMarkerBegin vkCmdDbgMarkerEnd | TBD | None |
Tobin Ehlisa77845b2015-08-25 09:56:38 -060017| Valid BeginCommandBuffer level-related parameters | 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_STATE | vkBeginCommandBuffer | PrimaryCmdBufferFramebufferAndRenderpass SecondaryCmdBufferFramebufferAndRenderpass | None |
18| PSO Bound | Verify that a properly created and valid pipeline object is bound to the CmdBuffer specified in these calls | NO_PIPELINE_BOUND | vkCmdBindDescriptorSets vkCmdBindVertexBuffers | PipelineNotBound | This check is currently more related to DrawState 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. |
Tobin Ehlis236717c2015-08-31 12:42:38 -060019| Valid DescriptorPool | Verifies that the descriptor set pool object was properly created and is valid | INVALID_POOL | vkResetDescriptorPool vkAllocDescriptorSets | None | This is just an internal layer data structure check. ParamChecker or ObjectTracker should really catch bad DSPool |
Tobin Ehlisa77845b2015-08-25 09:56:38 -060020| Valid DescriptorSet | Validate that descriptor set was properly created and is currently valid | INVALID_SET | vkCmdBindDescriptorSets | None | Is this needed other places (like Update/Clear descriptors) |
21| Valid DescriptorSetLayout | Flag DescriptorSetLayout object that was not properly created | INVALID_LAYOUT | vkAllocDescriptorSets | None | Anywhere else to check this? |
22| Valid Pipeline | Flag VkPipeline object that was not properly created | INVALID_PIPELINE | vkCmdBindPipeline | InvalidPipeline | NA |
Tobin Ehlis2235fbc2015-08-27 17:43:11 -060023| Valid Pipeline Create Info | Tests 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 is set as IA topology for tessellation pipelines, that VK_PRIMITIVE_TOPOLOGY_PATCH primitive topology is only set for tessellation pipelines, and that Vtx Shader specified | INVALID_PIPELINE_CREATE_STATE | vkCreateGraphicsPipelines | InvalidPipelineCreateState | NA |
Courtney Goeltzenleuchter831c1832015-10-23 14:21:05 -060024| Valid CmdBuffer | Validates that the command buffer object was properly created and is currently valid | INVALID_CMD_BUFFER | vkQueueSubmit 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 vkCmdDbgMarkerBegin vkCmdDbgMarkerEnd vkAllocCommandBuffers | None | NA |
Tobin Ehlisa77845b2015-08-25 09:56:38 -060025| Vtx Buffer Bounds | Check if VBO index too large for PSO Vtx binding count, and that at least one vertex buffer is attached to pipeline object | VTX_INDEX_OUT_OF_BOUNDS | vkCmdBindDescriptorSets vkCmdBindVertexBuffers | VtxBufferBadIndex | NA |
Tobin Ehlis8d199e52015-09-17 12:24:13 -060026| Idx Buffer Alignment | Verify that offset of Index buffer falls on an alignment boundary as defined by IdxBufferAlignmentError param | VTX_INDEX_ALIGNMENT_ERROR | vkCmdBindIndexBuffer | IdxBufferAlignmentError | NA |
Tobin Ehlisa77845b2015-08-25 09:56:38 -060027| Cmd Buffer End | Verifies that EndCommandBuffer was called for this cmdBuffer at QueueSubmit time | NO_END_CMD_BUFFER | vkQueueSubmit | NoEndCmdBuffer | NA |
Courtney Goeltzenleuchter9feb0732015-10-15 16:51:05 -060028| Cmd Buffer Begin | Check that BeginCommandBuffer was called for this command buffer when binding commands or calling end | NO_BEGIN_CMD_BUFFER | vkEndCommandBuffer 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 vkCmdWriteTimestamp | NoBeginCmdBuffer | NA |
Tobin Ehlis236717c2015-08-31 12:42:38 -060029| Cmd Buffer Submit Count | Verify that ONE_TIME submit cmdbuffer is not submitted multiple times | CMD_BUFFER_SINGLE_SUBMIT_VIOLATION | vkBeginCommandBuffer, vkQueueSubmit | CmdBufferTwoSubmits | NA |
Tobin Ehlis5f728d32015-09-17 14:18:16 -060030| Valid Secondary CmdBuffer | Validates that no primary command buffers are sent to vkCmdExecuteCommands() are | INVALID_SECONDARY_CMD_BUFFER | vkCmdExecuteCommands | ExecuteCommandsPrimaryCB | NA |
Tobin Ehlis2235fbc2015-08-27 17:43:11 -060031| Descriptor Type | Verify Descriptor type in bound descriptor set layout matches descriptor type specified in update | DESCRIPTOR_TYPE_MISMATCH | vkUpdateDescriptorSets | DSTypeMismatch | With various DS API updates, need to revisit this code |
32| DS Update Size | DS update out of bounds for given layout section | DESCRIPTOR_UPDATE_OUT_OF_BOUNDS | vkUpdateDescriptorSets | DSUpdateOutOfBounds | NA |
Tobin Ehlisc6457d22015-10-20 16:16:04 -060033| Descriptor Pool empty | Attempt to allocate descriptor type from descriptor pool when no more of that type are available to be allocated. | DESCRIPTOR_POOL_EMPTY | vkAllocDescriptorSets | AllocDescriptorFromEmptyPool | NA |
Courtney Goeltzenleuchter831c1832015-10-23 14:21:05 -060034| Free from NON_FREE Pool | It's invalid to call vkFreeDescriptorSets() on Sets that were allocated from a Pool created with NON_FREE usage. | CANT_FREE_FROM_NON_FREE_POOL | vkFreeDescriptorSets | None | NA |
Tobin Ehlis2235fbc2015-08-27 17:43:11 -060035| DS Update Index | DS update binding too large for layout count | INVALID_UPDATE_INDEX | vkUpdateDescriptorSets | InvalidDSUpdateIndex | NA |
36| DS Update Type | Verifies that structs in DS Update tree are properly created, currenly valid, and of the right type | INVALID_UPDATE_STRUCT | vkUpdateDescriptorSets | InvalidDSUpdateStruct | NA |
Tobin Ehlisa77845b2015-08-25 09:56:38 -060037| MSAA Sample Count | Verifies that Pipeline, RenderPass, and Subpass sample counts are consistent | NUM_SAMPLES_MISMATCH | vkCmdBindPipeline vkCmdBeginRenderPass vkCmdNextSubpass | NumSamplesMismatch | NA |
Tobin Ehlis236717c2015-08-31 12:42:38 -060038| Dynamic Viewport State Binding | Verify that viewport dynamic state bound to Cmd Buffer at Draw time | VIEWPORT_NOT_BOUND |vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect | ViewportStateNotBound | NA |
Tobin Ehlisf6cb4672015-09-29 08:18:34 -060039| Dynamic Scissor State Binding | Verify that scissor dynamic state bound to Cmd Buffer at Draw time | SCISSOR_NOT_BOUND |vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect | ScissorStateNotBound | NA |
Tobin Ehlis236717c2015-08-31 12:42:38 -060040| Dynamic Line Width State Binding | Verify that line width dynamic state bound to Cmd Buffer at when required (TODO : Verify when this is) | LINE_WIDTH_NOT_BOUND |vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect | TODO | Verify this check and Write targeted test |
41| Dynamic Depth Bias State Binding | Verify that depth bias dynamic state bound when depth enabled | DEPTH_BIAS_NOT_BOUND |vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect | TODO | Verify this check and Write targeted test |
42| Dynamic Blend State Binding | Verify that blend dynamic state bound when color blend enabled | BLEND_NOT_BOUND |vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect | TODO | Verify this check and Write targeted test |
43| Dynamic Depth Bounds State Binding | Verify that depth bounds dynamic state bound when depth enabled | DEPTH_BOUNDS_NOT_BOUND |vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect | TODO | Verify this check and Write targeted test |
44| Dynamic Stencil State Binding | Verify that stencil dynamic state bound when depth enabled | STENCIL_NOT_BOUND |vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect | TODO | Verify this check and Write targeted test |
Mark Lobodzinski70244842015-10-01 17:00:47 -060045| RenderPass misuse | Tests for the following: that vkCmdDispatch, vkCmdDispatchIndirect, vkCmdCopyBuffer, vkCmdCopyImage, vkCmdBlitImage, vkCmdCopyBufferToImage, vkCmdCopyImageToBuffer, vkCmdUpdateBuffer, vkCmdFillBuffer, vkCmdClearColorImage, vkCmdClearDepthStencilImage, vkCmdResolveImage, vkCmdSetEvent, vkCmdResetEvent, vkCmdResetQueryPool, vkCmdCopyQueryPoolResults, vkCmdBeginRenderPass are not called during an active Renderpass, and that binding compute descriptor sets or pipelines does not take place during an active Renderpass | INVALID_RENDERPASS_CMD | vkCmdBindPipeline vkCmdBindDescriptorSets vkCmdDispatch vkCmdDispatchIndirect vkCmdCopyBuffer vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdUpdateBuffer vkCmdFillBuffer vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdResolveImage vkCmdSetEvent vkCmdResetEvent vkCmdResetQueryPool vkCmdCopyQueryPoolResults vkCmdBeginRenderPass | RenderPassWithinRenderPass UpdateBufferWithinRenderPass ClearColorImageWithinRenderPass ClearDepthStencilImageWithinRenderPass FillBufferWithinRenderPass | NA |
Courtney Goeltzenleuchter9feb0732015-10-15 16:51:05 -060046| Correct use of RenderPass | Validates that the following rendering commands are issued inside an active RenderPass: vkCmdDraw, vkCmdDrawIndexed, vkCmdDrawIndirect, vkCmdDrawIndexedIndirect, vkCmdClearAttachments, vkCmdNextSubpass, vkCmdEndRenderPass | NO_ACTIVE_RENDERPASS | vkCmdBindPipeline vkCmdBindDescriptorSets vkCmdDraw vkCmdDrawIndexed vkCmdDrawIndirect vkCmdDrawIndexedIndirect vkCmdClearAttachments vkCmdNextSubpass vkCmdEndRenderPass | BindPipelineNoRenderPass ClearAttachmentsOutsideRenderPass | NA |
Tobin Ehlis236717c2015-08-31 12:42:38 -060047| Valid RenderPass | Flag error if attempt made to Begin/End/Continue a NULL or otherwise invalid RenderPass object | INVALID_RENDERPASS | vkCmdBeginRenderPass vkCmdEndRenderPass vkBeginCommandBuffer | NullRenderPass | NA |
Tobin Ehlis2235fbc2015-08-27 17:43:11 -060048| DescriptorSet Updated | Warn user if DescriptorSet bound that was never updated | DESCRIPTOR_SET_NOT_UPDATED | vkCmdBindDescriptorSets | DescriptorSetNotUpdated | NA |
49| Correct Clear Use | Warn 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_DRAW | vkCmdClearColorImage vkCmdClearDepthStencilImage | ClearCmdNoDraw | NA |
Tobin Ehlis236717c2015-08-31 12:42:38 -060050| Index Buffer Binding | Verify that an index buffer is bound at the point when an indexed draw is attempted. | INDEX_BUFFER_NOT_BOUND | vkCmdDrawIndexed vkCmdDrawIndexedIndirect | TODO | Implement validation test |
Tobin Ehlis9e839e52015-10-01 11:15:13 -060051| Viewport and Scissors match | In 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_MISMATCH | vkCreateGraphicsPipelines vkCmdSetViewport vkCmdSetScissor | TODO | Implement validation test |
Tobin Ehlisb46be812015-10-23 16:00:08 -060052| Valid Image Aspects for descriptor Updates | When 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_ASPECT | vkUpdateDescriptorSets | DepthStencilImageViewWithColorAspectBitError | This test hits Image layer error, but tough to create case that that skips that error and gets to DrawState error. |
53| Valid sampler descriptor Updates | An invalid sampler is used when updating SAMPLER descriptor. | SAMPLER_DESCRIPTOR_ERROR | vkUpdateDescriptorSets | SampleDescriptorUpdateError | Currently only making sure sampler handle is known, can add further validation for sampler parameters |
54| Valid imageView descriptor Updates | An invalid imageView is used when updating *_IMAGE or *_ATTACHMENT descriptor. | IMAGEVIEW_DESCRIPTOR_ERROR | vkUpdateDescriptorSets | ImageViewDescriptorUpdateError | Currently only making sure imageView handle is known, can add further validation for imageView and underlying image parameters |
55| Valid bufferView descriptor Updates | An invalid bufferView is used when updating *_TEXEL_BUFFER descriptor. | BUFFERVIEW_DESCRIPTOR_ERROR | vkUpdateDescriptorSets | BufferViewDescriptorUpdateError | Currently only making sure bufferView handle is known, can add further validation for bufferView parameters |
56| Valid bufferInfo descriptor Updates | An invalid bufferInfo is used when updating *_UNIFORM_BUFFER* or *_STORAGE_BUFFER* descriptor. | BUFFERINFO_DESCRIPTOR_ERROR | vkUpdateDescriptorSets | TODO | Implement validation test |
57| Attachment References in Subpass | Attachment reference must be present in active subpass | MISSING_ATTACHMENT_REFERENCE | vkCmdClearAttachments | BufferInfoDescriptorUpdateError | Currently only making sure bufferInfo has buffer whose handle is known, can add further validation for bufferInfo parameters |
Tobin Ehlis236717c2015-08-31 12:42:38 -060058| NA | Enum used for informational messages | NONE | | NA | None |
59| NA | Enum used for errors in the layer itself. This does not indicate an app issue, but instead a bug in the layer. | INTERNAL_ERROR | | NA | None |
60| NA | Enum used when Drawstate attempts to allocate memory for its own internal use and is unable to. | OUT_OF_MEMORY | | NA | None |
61| NA | Enum used when Drawstate attempts to allocate memory for its own internal use and is unable to. | OUT_OF_MEMORY | | NA | None |
Tobin Ehlisa77845b2015-08-25 09:56:38 -060062
Jens Owenef5b8ed2015-08-25 12:29:34 -040063### DrawState Pending Work
Tobin Ehlisa77845b2015-08-25 09:56:38 -060064Additional checks to be added to DrawState
65
66 5. dynamicOffsetCount lists how many entries are present in pDynamicOffsets - account for this (not certain of what needs to be done here but we don't have any test cases for dynamicOffsets, so keeping this task around until we do)
67 7. Lifetime validation (See [bug 13383](https://cvs.khronos.org/bugzilla/show_bug.cgi?id=13383))
68 8. XGL_DESCRIPTOR_SET
69 9. Cannot be deleted until no longer in use on GPU, or referenced in any pending command.
Courtney Goeltzenleuchter831c1832015-10-23 14:21:05 -060070 10. Sets in XGL_DESCRIPTOR_REGION_USAGE_NON_FREE regions can never be deleted. Instead the xglClearDescriptorRegion() deletes all sets.
Tobin Ehlisa77845b2015-08-25 09:56:38 -060071 11. Sets in XGL_DESCRIPTOR_REGION_USAGE_DYNAMIC regions can be deleted.
72 12. XGL_DESCRIPTOR_SET_LAYOUT
73 13. What do IHVs want here?
74 14. Option 1 (assuming this one): Must not be deleted until all sets and layout chains referencing the set layout are deleted.
75 15. Option 2: Can be freely deleted after usage.
76 19. XGL_DESCRIPTOR_REGION
77 20. Cannot be deleted until no longer in use on the GPU, or referenced in any pending command.
78 21. XGL_BUFFER_VIEW, XGL_IMAGE_VIEW, etc
79 22. Cannot be deleted until the descriptors referencing the objects are deleted.
Courtney Goeltzenleuchter9feb0732015-10-15 16:51:05 -060080 23. For ClearAttachments function, verify that the index of referenced attachment actually exists
Tobin Ehlisa77845b2015-08-25 09:56:38 -060081 24. GetRenderAreaGranularity - The pname:renderPass parameter must be the same as the one given in the sname:VkRenderPassBeginInfo structure for which the render area is relevant.
82 26. vkFreeDescriptorSets must not be called for sets created on top of one-shot pool
83 27. If Cmd Buffer one-time submit flag is set, then verify that cmd buffer is only submitted once
84 28. Verify that all relevent dynamic state objects are bound (See https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14323)
85 29. Flag an error if CmdBuffer has Begin called while it's being constructed - this is not a reset, this is a violation
86 30. At PSO creation time, there is no case when NOT including a FS should flag an error since there exist dynamic state configurations that can be set to cause a FS to not be required. Instead, in the case when no FS is in the PSO, validation should detect at runtime if dynamic state will require a FS, and in those case issue a runtime warning about undefined behavior. (see bug https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14429)
87 31. Error if a cmdbuffer is submitted on a queue whose family doesn't match the family of the pool from which it was created.
Tobin Ehlisf6cb4672015-09-29 08:18:34 -060088 32. Update Gfx Pipe Create Info shadowing to remove new/delete and instead use unique_ptrs for auto clean-up
Tobin Ehlisa77845b2015-08-25 09:56:38 -060089
Jens Owenef5b8ed2015-08-25 12:29:34 -040090## ParamChecker
Tobin Ehlisa77845b2015-08-25 09:56:38 -060091
Jens Owenef5b8ed2015-08-25 12:29:34 -040092### ParamChecker Overview
Tobin Ehlisa77845b2015-08-25 09:56:38 -060093
94The ParamChecker layer validates parameter values and flags errors for any values that are outside of acceptable values for the given parameter.
95
Jens Owenef5b8ed2015-08-25 12:29:34 -040096### ParamChecker Details Table
Tobin Ehlisa77845b2015-08-25 09:56:38 -060097
98| Check | Overview | ENUM | Relevant API | Testname | Notes/TODO |
99| ----- | -------- | ---------------- | ------------ | -------- | ---------- |
Courtney Goeltzenleuchter831c1832015-10-23 14:21:05 -0600100| Input Parameters | Pointers in structures are recursively validated to be non-null. Enumerated types are validated against min and max enum values. Structure Types are verified to be correct. | NA | vkQueueSubmit vkAllocMemory vkFlushMappedMemoryRanges vkInvalidateMappedMemoryRanges vkQueueBindSparseBufferMemory vkQueueBindSparseImageOpaqueMemory vkQueueBindSparseImageMemory vkCreateFence vkResetFences vkWaitForFences vkCreateSemaphore vkCreateEvent vkCreateQueryPool vkCreateBuffer vkCreateBufferView vkCreateImage vkGetImageSubresourceLayout vkCreateImageView vkCreateShader vkCreatePipelineCache vkMergePipelineCaches vkCreateGraphicsPipelines vkCreateComputePipelines vkCreatePipelineLayout vkCreateSampler vkCreateDescriptorSetLayout( vkCreateDescriptorPool vkAllocDescriptorSets vkFreeDescriptorSets vkUpdateDescriptorSets vkCreateFramebuffer vkCreateRenderPass vkCreateCommandPool vkAllocCommandBuffers vkBeginCommandBuffer vkCmdBindDescriptorSets vkCmdBindVertexBuffers vkCmdCopyBuffer vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdUpdateBuffer vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdClearAttachments vkCmdResolveImage vkCmdWaitEvents vkCmdPipelineBarrier vkCmdPushConstants vkCmdBeginRenderPass vkCmdExecuteCommands | TBD | NA |
101| Call results, Output Parameters | Return values are checked for VK_SUCCESS, returned pointers are checked to be NON-NULL, enumerated types of return values are checked to be within the defined range. | NA | vkEnumeratePhysicalDevices vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceLimits vkGetPhysicalDeviceProperties vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceMemoryProperties vkGetDeviceQueue vkQueueSubmit vkQueueWaitIdle vkDeviceWaitIdle vkAllocMemory vkFreeMemory vkMapMemory vkUnmapMemory vkFlushMappedMemoryRanges vkInvalidateMappedMemoryRanges vkGetDeviceMemoryCommitment vkBindBufferMemory vkBindImageMemory vkGetBufferMemoryRequirements vkGetImageMemoryRequirements vkGetImageSparseMemoryRequirements vkGetPhysicalDeviceSparseImageFormatProperties vkQueueBindSparseBufferMemory vkQueueBindSparseImageOpaqueMemory vkQueueBindSparseImageMemory vkCreateFence vkDestroyFence vkResetFences vkGetFenceStatus vkWaitForFences vkCreateSemaphore vkDestroySemaphore vkQueueSignalSemaphore vkQueueWaitSemaphore vkCreateEvent vkDestroyEvent vkGetEventStatus vkSetEvent vkResetEvent vkCreateQueryPool vkDestroyQueryPool vkGetQueryPoolResults vkCreateBuffer vkDestroyBuffer vkCreateBufferView vkDestroyBufferView vkCreateImage vkDestroyImage vkGetImageSubresourceLayout vkCreateImageView vkDestroyImageView vkDestroyShaderModule vkCreateShader vkDestroyShader vkCreatePipelineCache vkDestroyPipelineCache vkGetPipelineCacheSize vkGetPipelineCacheData vkMergePipelineCaches vkCreateGraphicsPipelines vkCreateComputePipelines vkDestroyPipeline vkCreatePipelineLayout vkDestroyPipelineLayout vkCreateSampler vkDestroySampler vkCreateDescriptorSetLayout vkDestroyDescriptorSetLayout vkCreateDescriptorPool vkDestroyDescriptorPool vkResetDescriptorPool vkAllocDescriptorSets vkFreeDescriptorSets vkUpdateDescriptorSets vkCreateFramebuffer vkDestroyFramebuffer vkCreateRenderPass vkDestroyRenderPass vkGetRenderAreaGranularity vkCreateCommandPool vkDestroyCommandPool vkResetCommandPool vkAllocCommandBuffers 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 vkCmdPushConstants vkCmdBeginRenderPass vkCmdNextSubpass vkCmdEndRenderPass vkCmdExecuteCommands | TBD | NA |
Tobin Ehlis236717c2015-08-31 12:42:38 -0600102| NA | Enum used for informational messages | NONE | | NA | None |
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600103
Jens Owenef5b8ed2015-08-25 12:29:34 -0400104### ParamChecker Pending Work
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600105Additional work to be done
106
107 1. Source2 was creating a VK_FORMAT_R8_SRGB texture (and image view) which was not supported by the underlying implementation (rendersystemtest imageformat test). Checking that formats are supported by the implementation is something the validation layer could do using the VK_FORMAT_INFO_TYPE_PROPERTIES query. There are probably a bunch of checks here you could be doing around vkCreateImage formats along with whether image/color/depth attachment views are valid. I’m not sure how much of this is already there.
108 2. From AMD: we were using an image view with a swizzle of VK_CHANNEL_FORMAT_A with a BC1_RGB texture, which is not valid because the texture does not have an alpha channel. In general, should validate that the swizzles do not reference components not in the texture format.
109 3. When querying VK_PHYSICAL_DEVICE_INFO_TYPE_QUEUE_PROPERTIES must provide enough memory for a all the queues on the device (not just 1 when device has multiple queues).
110 4. INT & FLOAT bordercolors. Border color int/float selection must match associated texture format.
111 5. Flag error on VkBufferCreateInfo if buffer size is 0
Courtney Goeltzenleuchter1856d6f2015-09-01 17:30:39 -0600112 6. VkImageViewCreateInfo.format must be set
Tobin Ehlis20693172015-09-17 08:46:18 -0600113 7. For vkCreateGraphicsPipelines, correctly handle array of pCreateInfos and array of pStages within each element of pCreatInfos
Tobin Ehlis8d199e52015-09-17 12:24:13 -0600114 8. Check for valid VkIndexType in vkCmdBindIndexBuffer() should be in PreCmdBindIndexBuffer() call
Tobin Ehlis5f728d32015-09-17 14:18:16 -0600115 9. Check for valid VkPipelineBindPoint in vkCmdBindPipeline() & vkCmdBindDescriptorSets() should be in PreCmdBindPipeline() & PreCmdBindDescriptorSets() calls respectively.
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600116
Jens Owenef5b8ed2015-08-25 12:29:34 -0400117## Image
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600118
Mark Lobodzinskib4092de2015-10-23 14:20:31 -0600119### Image Layer Overview
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600120
121The Image layer is responsible for validating format-related information and enforcing format restrictions.
122
Mark Lobodzinskib4092de2015-10-23 14:20:31 -0600123### Image Layer Details Table
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600124
125DETAILS TABLE PENDING
126
Tobin Ehlis65380532015-09-21 15:20:28 -0600127| Check | Overview | ENUM IMAGE_* | Relevant API | Testname | Notes/TODO |
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600128| ----- | -------- | ---------------- | ------------ | -------- | ---------- |
Tobin Ehlis65380532015-09-21 15:20:28 -0600129| Image Format | Verifies that requested format is a supported Vulkan format on this device | FORMAT_UNSUPPORTED | vkCreateImage vkCreateRenderPass | TBD | NA |
130| RenderPass Attachments | Validates that attachment image layouts, loadOps, and storeOps are valid Vulkan values | RENDERPASS_INVALID_ATTACHMENT | vkCreateRenderPass | TBD | NA |
131| Subpass DS Settings | Verifies that if there is no depth attachment then the subpass attachment is set to VK_ATTACHMENT_UNUSED | RENDERPASS_INVALID_DS_ATTACHMENT | vkCreateRenderPass | TBD | NA |
132| View Creation | Verify that requested Image View Creation parameters are reasonable for the image that the view is being created for | VIEW_CREATE_ERROR | vkCreateImageView | TBD | NA |
Mark Lobodzinskib4092de2015-10-23 14:20:31 -0600133| Image Aspects | Verify that Image commands are using valid Image Aspect flags | INVALID_IMAGE_ASPECT | vkCreateImageView vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdClearAttachments vkCmdCopyImage vkCmdCopyImageToBuffer vkCmdCopyBufferToImage vkCmdResolveImage vkCmdBlitImage | InvalidImageViewAspect | NA |
Mark Lobodzinski6f3403c2015-10-05 17:16:05 -0600134| Image Aspect Mismatch | Verify that Image commands with source and dest images use matching aspect flags | MISMATCHED_IMAGE_ASPECT | vkCmdCopyImage | TBD | NA |
Mike Stroyan43909d82015-09-25 13:39:21 -0600135| Image Type Mismatch | Verify that Image commands with source and dest images use matching types | MISMATCHED_IMAGE_TYPE | vkCmdCopyImage vkCmdResolveImage | CopyImageTypeMismatch ResolveImageTypeMismatch | NA |
136| Image Format Mismatch | Verify that Image commands with source and dest images use matching formats | MISMATCHED_IMAGE_FORMAT | vkCmdCopyImage vkCmdResolveImage | CopyImageDepthStencilFormatMismatch ResolveImageFormatMismatch | NA |
137| Resolve Sample Count | Verifies that source and dest images sample counts are valid | INVALID_RESOLVE_SAMPLES | vkCmdResolveImage | ResolveImageHighSampleCount ResolveImageLowSampleCount | NA |
Mark Lobodzinskib4092de2015-10-23 14:20:31 -0600138| Verify Format | Verifies the formats are valid for this image operation | INVALID_FORMAT | vkCreateImageView vkCmdBlitImage | TBD | NA |
139| Verify Correct Image Filter| Verifies that specified filter is valid | INVALID_FILTER | vkCmdBlitImage | TBD | NA |
Tobin Ehlis65380532015-09-21 15:20:28 -0600140| NA | Enum used for informational messages | NONE | | NA | None |
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600141
Jens Owenef5b8ed2015-08-25 12:29:34 -0400142### Image Pending Work
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600143Additional work to be done
144
Jens Owenef5b8ed2015-08-25 12:29:34 -0400145## MemTracker
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600146
Jens Owenef5b8ed2015-08-25 12:29:34 -0400147### MemTracker Overview
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600148
Tobin Ehlis173d93e2015-10-01 15:26:33 -0600149The MemTracker 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. MemTracker validates several other hazard-related issues related to command buffers, fences, and memory mapping.
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600150
Jens Owenef5b8ed2015-08-25 12:29:34 -0400151### MemTracker Details Table
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600152
153| Check | Overview | ENUM MEMTRACK_* | Relevant API | Testname | Notes/TODO |
154| ----- | -------- | ---------------- | ------------ | -------- | ---------- |
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -0600155| Valid Command Buffer | Verifies that the command buffer was properly created and is currently valid | INVALID_CB | vkCmdBindPipeline vkCmdSetViewport vkCmdSetLineWidth vkCmdSetDepthBias vkCmdSetBlendConstants vkCmdSetDepthBounds vkCmdSetStencilCompareMask vkCmdSetStencilWriteMask vkCmdSetStencilReference vkBeginCommandBuffer vkResetCommandBuffer vkDestroyDevice vkFreeMemory | NA | NA |
Tobin Ehlis2235fbc2015-08-27 17:43:11 -0600156| Valid Memory Object | Verifies that the memory object was properly created and is currently valid | INVALID_MEM_OBJ | vkCmdDrawIndirect vkCmdDrawIndexedIndirect vkCmdDispatchIndirect vkCmdCopyBuffer vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdUpdateBuffer vkCmdFillBuffer vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdResolveImage vkFreeMemory vkBindBufferMemory vkBindImageMemory vkQueueBindSparseImageOpaqueMemory vkQueueBindSparseImageMemory vkQueueBindSparseBufferMemory | NA | NA |
157| Free Referenced Memory | Checks to see if memory being freed still has current references | FREED_MEM_REF | vmFreeMemory | FreeBoundMemory | NA |
158| Memory Properly Bound | Validate that the memory object referenced in the call was properly created, is currently valid, and is properly bound to the object | MISSING_MEM_BINDINGS | vkCmdDrawIndirect vkCmdDrawIndexedIndirect vkCmdDispatchIndirect vkCmdCopyBuffer vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdUpdateBuffer vkCmdFillBuffer vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdResolveImage | NA | NA |
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -0600159| Valid Object | Verifies that the specified Vulkan object was created properly and is currently valid | INVALID_OBJECT | vkCmdBindPipeline vkCmdDrawIndirect vkCmdDrawIndexedIndirect vkCmdDispatchIndirect vkCmdCopyBuffer vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdUpdateBuffer vkCmdFillBuffer vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdResolveImage | NA | NA |
Tobin Ehlis87f115c2015-09-15 15:02:17 -0600160| Bind Invalid Memory | Validate that memory object was correctly created, that the command buffer object was correctly created, and that both are currently valid objects. | MEMORY_BINDING_ERROR | vkQueueBindSparseImageOpaqueMemory vkQueueBindSparseImageMemory vkQueueBindSparseBufferMemory vkCmdDrawIndirect vkCmdDrawIndexedIndirect vkCmdDispatchIndirect vkCmdCopyBuffer vkCmdCopyImage vkCmdBlitImage vkCmdCopyBufferToImage vkCmdCopyImageToBuffer vkCmdUpdateBuffer vkCmdFillBuffer vkCmdClearColorImage vkCmdClearDepthStencilImage vkCmdResolveImage | NA | The valid Object checks are primarily the responsibilty of ObjectTracker layer, so these checks are more of a backup in case ObjectTracker is not enabled |
Tobin Ehlis2235fbc2015-08-27 17:43:11 -0600161| Objects Not Destroyed | Verify all objects destroyed at DestroyDevice time | MEMORY_LEAK | vkDestroyDevice | NA | NA |
162| Memory Mapping State | Verifies that mapped memory is CPU-visible | INVALID_STATE | vkMapMemory | MapMemWithoutHostVisibleBit | NA |
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600163| Command Buffer Synchronization | Command Buffer must be complete before BeginCommandBuffer or ResetCommandBuffer can be called | RESET_CB_WHILE_IN_FLIGHT | vkBeginCommandBuffer vkResetCommandBuffer | CallBeginCmdBufferBeforeCompletion CallBeginCmdBufferBeforeCompletion | NA |
Tobin Ehlis21d6a742015-09-14 13:25:57 -0600164| Submitted Fence Status | Verifies 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 submitted | INVALID_FENCE_STATE | vkResetFences vkWaitForFences vkQueueSubmit vkGetFenceStatus | SubmitSignaledFence ResetUnsignaledFence | Create test(s) for case where an unsubmitted fence is having its status checked |
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600165| Immutable Memory Binding | Validates that non-sparse memory bindings are immutable, so objects are not re-boundt | REBIND_OBJECT | vkBindBufferMemory, vkBindImageMemory | RebindMemory | NA |
Courtney Goeltzenleuchter1856d6f2015-09-01 17:30:39 -0600166| Image/Buffer Usage bits | Verify correct USAGE bits set based on how Images and Buffers are used | INVALID_USAGE_FLAG | vkCreateImage, vkCreateBuffer, vkCreateBufferView, vkCmdCopyBuffer, vkCmdCopyImage, vkCmdBlitImage, vkCmdCopyBufferToImage, vkCmdCopyImageToBuffer, vkCmdUpdateBuffer, vkCmdFillBuffer | InvalidUsageBits | NA |
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600167| Objects Not Destroyed Warning | Warns if any memory objects have not been freed before their objects are destroyed | MEM_OBJ_CLEAR_EMPTY_BINDINGS | vkDestroyDevice | TBD | NA |
Tobin Ehlis236717c2015-08-31 12:42:38 -0600168| NA | Enum used for informational messages | NONE | | NA | None |
169| NA | Enum used for errors in the layer itself. This does not indicate an app issue, but instead a bug in the layer. | INTERNAL_ERROR | | NA | None |
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600170
Jens Owenef5b8ed2015-08-25 12:29:34 -0400171### MemTracker Pending Work
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600172
Jens Owenef5b8ed2015-08-25 12:29:34 -0400173#### MemTracker Enhancements
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600174
1751. Flag any memory hazards: Validate that the pipeline barriers for buffers are sufficient to avoid hazards
1762. Make sure that the XGL_IMAGE_VIEW_ATTACH_INFO.layout matches the layout of the image as determined by the last IMAGE_MEMORY_BARRIER
Tobin Ehlis2235fbc2015-08-27 17:43:11 -06001773. Verify that the XGL_IMAGE_MEMORY_BARRIER.oldLayout matches the actual previous layout (this one was super important for previous work in dealing with out-of-order command buffer generation). Note that these need to be tracked for each subresource.
Tobin Ehlisa77845b2015-08-25 09:56:38 -06001784. Update for new Memory Binding Model
1795. Consolidate error messages and make them consistent
1807. Add validation for having mapped objects in a command list - GPU writing to mapped object is warning
1818. Add validation for maximum memory references, maximum object counts, and object leaks
1829. When performing clears on surfaces that have both Depth and Stencil, WARN user if subresource range for depth and stencil are not both set (see blit_tests.cpp VkCmdClearDepthStencilTest test).
18310. Re-enable INFO messages that were disabled during v138 integration
18411. Warn on image/buffer deletion if USAGE bits were set that were not needed
18512. Modify INVALID_FENCE_STATE to be WARNINGs instead of ERROR
Mike Stroyan70fd0852015-08-28 11:33:32 -060018613. Report destroy or modify of resources in use on queues and not cleared by fence or WaitIdle. Could be fence, semaphore, or objects used by submitted CommandBuffers.
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600187
188
Jens Owenef5b8ed2015-08-25 12:29:34 -0400189## ShaderChecker
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600190
Jens Owenef5b8ed2015-08-25 12:29:34 -0400191### ShaderChecker Overview
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600192
193The ShaderChecker layer inspects the SPIR-V shader images and fixed function pipeline stages at PSO creation time.
194It flags errors when inconsistencies are found across interfaces between shader stages. The exact behavior of the checks
195depends on the pair of pipeline stages involved.
196
Jens Owenef5b8ed2015-08-25 12:29:34 -0400197### ShaderChecker Details Table
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600198
199| Check | Overview | ENUM SHADER_CHECKER_* | Relevant API | Testname | Notes/TODO |
200| ----- | -------- | ---------------- | ------------ | -------- | ---------- |
Tobin Ehlis2235fbc2015-08-27 17:43:11 -0600201| Not consumed | Flag warning if a location is not consumed (useless work) | OUTPUT_NOT_CONSUMED | vkCreateGraphicsPipelines | CreatePipeline*NotConsumed | NA |
202| Not produced | Flag error if a location is not produced (consumer reads garbage) | INPUT_NOT_PRODUCED | vkCreateGraphicsPipelines | CreatePipeline*NotProvided | NA |
203| Type mismatch | Flag error if a location has inconsistent types | INTERFACE_TYPE_MISMATCH | vkCreateGraphicsPipelines | CreatePipeline*TypeMismatch | Between 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. |
204| Inconsistent shader | Flag error if an inconsistent SPIR-V image is detected. Possible cases include broken type definitions which the layer fails to walk. | INCONSISTENT_SPIRV | vkCreateGraphicsPipelines | TODO | All current tests use the reference compiler to produce valid SPIRV images from GLSL. |
205| Non-SPIRV shader | Flag warning if a non-SPIR-V shader image is detected. This can occur if early drivers are ingesting GLSL. ShaderChecker cannot analyze non-SPIRV shaders, so this suppresses most other checks. | NON_SPIRV_SHADER | vkCreateGraphicsPipelines | TODO | NA |
206| FS mixed broadcast | Flag error if the fragment shader writes both the legacy gl_FragCoord (which broadcasts to all CBs) and custom FS outputs. | FS_MIXED_BROADCAST | vkCreateGraphicsPipelines | TODO | Reference compiler refuses to compile shaders which do this |
207| VI Binding Descriptions | Validate that there is a single vertex input binding description for each binding | INCONSISTENT_VI | vkCreateGraphicsPipelines | CreatePipelineAttribBindingConflict | NA |
208| Shader Stage Check | Warns if shader stage is unsupported | UNKNOWN_STAGE | vkCreateGraphicsPipelines | TBD | NA |
Cody Northropf03481c2015-09-18 11:26:59 -0600209| Missing Descriptor | Flags error if shader attempts to use a descriptor binding not declared in the layout | MISSING_DESCRIPTOR | vkCreateGraphicsPipelines | CreatePipelineUniformBlockNotProvided | NA |
Tobin Ehlis236717c2015-08-31 12:42:38 -0600210| NA | Enum used for informational messages | NONE | | NA | None |
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600211
Jens Owenef5b8ed2015-08-25 12:29:34 -0400212### ShaderChecker Pending Work
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600213- Additional test cases for variously broken SPIRV images
214- Validation of a single SPIRV image in isolation (the spec describes many constraints)
215- Validation of SPIRV use of descriptors against the declared descriptor set layout
216
Jens Owenef5b8ed2015-08-25 12:29:34 -0400217## ObjectTracker
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600218
Jens Owenef5b8ed2015-08-25 12:29:34 -0400219### ObjectTracker Overview
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600220
221The ObjectTracker 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.
222
Jens Owenef5b8ed2015-08-25 12:29:34 -0400223### ObjectTracker Details Table
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600224
225| Check | Overview | ENUM OBJTRACK_* | Relevant API | Testname | Notes/TODO |
226| ----- | -------- | ---------------- | ------------ | -------- | ---------- |
Courtney Goeltzenleuchter831c1832015-10-23 14:21:05 -0600227| Valid Object | Validates that referenced object was properly created and is currently valid. | INVALID_OBJECT | vkAcquireNextImageKHR vkAllocDescriptorSets vkAllocMemory 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 vkAllocCommandBuffers vkCreateCommandPool vkCreateComputePipelines vkCreateDescriptorPool vkCreateDescriptorSetLayout vkCreateEvent vkCreateFence vkCreateFramebuffer vkCreateGraphicsPipelines vkCreateImage vkCreateImageView vkCreatePipelineCache vkCreatePipelineLayout vkCreateQueryPool vkCreateRenderPass vkCreateSampler vkCreateSemaphore vkCreateShader vkCreateShaderModule vkCreateSwapchainKHR vkDestroyBuffer vkDestroyBufferView vkFreeCommandBuffers vkDestroyCommandPool vkDestroyDescriptorPool vkDestroyDescriptorSetLayout vkDestroyEvent vkDestroyFence vkDestroyFramebuffer vkDestroyImage vkDestroyImageView vkDestroyPipeline vkDestroyPipelineCache vkDestroyPipelineLayout vkDestroyQueryPool vkDestroyRenderPass vkDestroySampler vkDestroySemaphore vkDestroyShader vkDestroyShaderModule vkDestroySwapchainKHR vkDeviceWaitIdle vkEndCommandBuffer vkEnumeratePhysicalDevices vkFreeDescriptorSets vkFreeMemory vkFreeMemory vkGetBufferMemoryRequirements vkGetDeviceMemoryCommitment vkGetDeviceQueue vkGetEventStatus vkGetFenceStatus vkGetImageMemoryRequirements vkGetImageSparseMemoryRequirements vkGetImageSubresourceLayout vkGetPhysicalDeviceSurfaceSupportKHR vkGetPipelineCacheData vkGetPipelineCacheSize vkGetQueryPoolResults vkGetRenderAreaGranularity vkInvalidateMappedMemoryRanges vkMapMemory vkMergePipelineCaches vkQueueBindSparseBufferMemory vkQueueSignalSemaphore vkQueueWaitSemaphore vkResetCommandBuffer vkResetCommandPool vkResetDescriptorPool vkResetEvent vkResetFences vkSetEvent vkUnmapMemory vkUpdateDescriptorSets vkWaitForFences | BindInvalidMemory BindMemoryToDestroyedObject | Every VkObject class of parameter will be run through this check. This check may ultimately supersede UNKNOWN_OBJECT |
Tobin Ehlis2235fbc2015-08-27 17:43:11 -0600228| Object Cleanup | Verify that object properly destroyed | DESTROY_OBJECT_FAILED | vkDestroyInstance, vkDestroyDevice, vkFreeMemory | ? | NA |
229| Objects Leak | When an Instance or Device object is destroyed, validates that all objects belonging to that device/instance have previously been destroyed | OBJECT_LEAK | vkDestroyDevice vkDestroyInstance | ? | NA |
Tobin Ehlis236717c2015-08-31 12:42:38 -0600230| Object Count | Flag error if number of objects requested from extenstion functions exceeds max number of actual objects | OBJCOUNT_MAX_EXCEEDED | objTrackGetObjects objTrackGetObjectsOfType | ? | NA |
Courtney Goeltzenleuchter831c1832015-10-23 14:21:05 -0600231| Valid Destroy Object | Validates that an object pass into a destroy function was properly created and is currently valid | NONE | vkDestroyInstance vkDestroyDevice vkDestroyFence vkDestroySemaphore vkDestroyEvent vkDestroyQueryPool vkDestroyBuffer vkDestroyBufferView vkDestroyImage vkDestroyImageView vkDestroyShaderModule vkDestroyShader vkDestroyPipelineCache vkDestroyPipeline vkDestroyPipelineLayout vkDestroySampler vkDestroyDescriptorSetLayout vkDestroyDescriptorPool vkDestroyCommandPool vkFreeCommandBuffers vkDestroyFramebuffer vkDestroyRenderPass vkDestroySwapchainKHR | TBD | These cases need to be moved to a more appropriate error enum |
Tobin Ehlis236717c2015-08-31 12:42:38 -0600232| Unknown object | Internal layer errors when it attempts to update use count for an object that's not in its internal tracking datastructures. | UNKNOWN_OBJECT | | NA | This may be irrelevant due to INVALID_OBJECT error, need to look closely and merge this with that error as appropriate. |
233| NA | Enum used for informational messages | NONE | | NA | None |
234| NA | Enum used for errors in the layer itself. This does not indicate an app issue, but instead a bug in the layer. | INTERNAL_ERROR | | NA | None |
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600235
Jens Owenef5b8ed2015-08-25 12:29:34 -0400236### ObjectTracker Pending Work
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600237
238 4. Verify images have CmdPipelineBarrier layouts matching new layout parameters to Cmd*Image* functions
239 6. For specific object instances that are allowed to be NULL, update object validation to verify that such objects are either NULL or valid
Cass Everitt5addc5e2015-08-27 05:17:57 -0500240 7. Verify cube array VkImageView objects use subresourceRange.arraySize (or effective arraySize when VK_REMAINING_ARRAY_SLICES is specified) that is a multiple of 6.
Mike Stroyanb922b332015-09-24 10:37:08 -0600241 8. Make object maps specific to instance and device. Objects may only be used with matching instance or device.
242 9. Use reference counting for non-dispatchable objects. Multiple object creation calls may return identical handles.
Tobin Ehlisf6cb4672015-09-29 08:18:34 -0600243 10. Update codegen for destroy_obj & validate_obj to generate all of the correct signatures and use the generated code
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600244
Jens Owenef5b8ed2015-08-25 12:29:34 -0400245## Threading
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600246
Jens Owenef5b8ed2015-08-25 12:29:34 -0400247### Threading Overview
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600248
249The Threading layer checks for simultaneous use of objects by calls from multiple threads.
250Application code is responsible for preventing simultaneous use of the same objects by certain calls that modify objects.
251See [bug 13433](https://cvs.khronos.org/bugzilla/show_bug.cgi?id=13433) and
252<https://cvs.khronos.org/svn/repos/oglc/trunk/nextgen/vulkan/function_properties.csv>
253for threading rules.
254Objects that may need a mutex include VkQueue, VkDeviceMemory, VkObject, VkBuffer, VkImage, VkDescriptorSet, VkDescriptorPool, VkCmdBuffer, and VkSemaphore.
255The most common case is that a VkCmdBuffer passed to VkCmd* calls must be used by only one thread at a time.
256
257In addition to reporting threading rule violations, the layer will enforce a mutex for those calls.
258That can allow an application to continue running without actually crashing due to the reported threading problem.
259
260The layer can only observe when a mutual exclusion rule is actually violated.
261It cannot insure that there is no latent race condition needing mutual exclusion.
262
263The layer can also catch reentrant use of the same object by calls from a single thread.
264That might happen if Vulkan calls are made from a callback function or a signal handler.
265But the layer cannot prevent such a reentrant use of an object.
266
267The layer can only observe when a mutual exclusion rule is actually violated.
268It cannot insure that there is no latent race condition.
269
Jens Owenef5b8ed2015-08-25 12:29:34 -0400270### Threading Details Table
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600271
Tobin Ehlis2235fbc2015-08-27 17:43:11 -0600272| Check | Overview | ENUM THREADING_CHECKER_* | Relevant API | Testname | Notes/TODO |
273| ----- | -------- | ---------------- | ---------------- | -------- | ---------- |
Courtney Goeltzenleuchter831c1832015-10-23 14:21:05 -0600274| Thread Collision | Detects and notifies user if multiple threads are modifying thes same object | MULTIPLE_THREADS | vkQueueSubmit vkFreeMemory vkMapMemory vkUnmapMemory vkFlushMappedMemoryRanges vkInvalidateMappedMemoryRanges vkBindBufferMemory vkBindImageMemory vkQueueBindSparseBufferMemory vkQueueBindSparseImageOpaqueMemory vkQueueBindSparseImageMemory vkDestroySemaphore vkQueueSignalSemaphore vkDestroyBuffer vkDestroyImage vkDestroyDescriptorPool vkResetDescriptorPool vkAllocDescriptorSets 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 vkCmdExecuteCommands | ??? | NA |
275| Thread Reentrancy | Detects cases of a single thread calling Vulkan reentrantly | SINGLE_THREAD_REUSE | vkQueueSubmit vkFreeMemory vkMapMemory vkUnmapMemory vkFlushMappedMemoryRanges vkInvalidateMappedMemoryRanges vkBindBufferMemory vkBindImageMemory vkQueueBindSparseBufferMemory vkQueueBindSparseImageOpaqueMemory vkQueueBindSparseImageMemory vkDestroySemaphore vkQueueSignalSemaphore vkDestroyBuffer vkDestroyImage vkDestroyDescriptorPool vkResetDescriptorPool vkAllocDescriptorSets 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 vkCmdExecuteCommands | ??? | NA |
Tobin Ehlis236717c2015-08-31 12:42:38 -0600276| NA | Enum used for informational messages | NONE | | NA | None |
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600277
Jens Owenef5b8ed2015-08-25 12:29:34 -0400278### Threading Pending Work
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600279Additional work to be done
280
Jens Owenef5b8ed2015-08-25 12:29:34 -0400281## Device Limitations
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600282
Jens Owenef5b8ed2015-08-25 12:29:34 -0400283### Device Limitations Overview
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600284
Tobin Ehlisc345b8b2015-09-03 09:50:06 -0600285This layer is a work in progress. DeviceLimits layer is intended to capture two broad categories of errors:
286 1. Incorrect use of APIs to query device capabilities
287 2. Attempt to use API functionality beyond the capability of the underlying device
288
289For the first category, the layer tracks which calls are made and flags errors if calls are excluded that should not be, or if call sequencing is incorrect. An example is an app that assumes attempts to Query and use queues without ever having called vkGetPhysicalDeviceQueueFamilyProperties(). Also, if an app is calling vkGetPhysicalDeviceQueueFamilyProperties() to retrieve properties with some assumed count for array size instead of first calling vkGetPhysicalDeviceQueueFamilyProperties() w/ a NULL pQueueFamilyProperties parameter in order to query the actual count.
290For the second category of errors, DeviceLimits stores its own internal record of underlying device capabilities and flags errors if requests are made beyond those limits. Most (all?) of the limits are queried via vkGetPhysicalDevice* calls.
291
292### Device Limitations Details Table
293
294| Check | Overview | ENUM DEVLIMITS_* | Relevant API | Testname | Notes/TODO |
295| ----- | -------- | ---------------- | ---------------- | -------- | ---------- |
296| Valid instance | If an invalid instance is used, this error will be flagged | INVALID_INSTANCE | vkEnumeratePhysicalDevices | NA | ObjectTracker should also catch this so if we made sure ObjectTracker was always on top, we could avoid this check |
297| Valid physical device | Enum used for informational messages | INVALID_PHYSICAL_DEVICE | vkEnumeratePhysicalDevices | NA | ObjectTracker should also catch this so if we made sure ObjectTracker was always on top, we could avoid this check |
298| Querying array counts | For 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_COUNT | vkEnumeratePhysicalDevices vkGetPhysicalDeviceQueueFamilyProperties | NA | Create focused test |
299| Array count value | For 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_MISMATCH | vkEnumeratePhysicalDevices vkGetPhysicalDeviceQueueFamilyProperties | NA | Create focused test |
300| Queue Creation | When creating/requesting queues, make sure that QueueFamilyPropertiesIndex and index/count within that queue family are valid. | INVALID_QUEUE_CREATE_REQUEST | vkGetDeviceQueue vkCreateDevice | NA | Create focused test |
Mark Lobodzinskiddaecf82015-09-22 09:33:21 -0600301| Query Properties | Before creating an Image, warn if physical device properties have not been queried | MUST_QUERY_PROPERTIES | vkCreateImage | NA | Add validation test |
Tobin Ehlis8a10b1b2015-09-24 15:25:16 -0600302| API Call Sequencing | This is a general error indicating that an app did not use vkGetPhysicalDevice* and other such query calls, but rather made an assumption about device capabilities. | INVALID_CALL_SEQUENCE | vkCreateDevice | NA | Add validation test |
303| Feature Request | Attempting to vkCreateDevice with a feature that is not supported by the underlying physical device. | INVALID_FEATURE_REQUESTED | vkCreateDevice | NA | Add validation test |
Mark Lobodzinskiddaecf82015-09-22 09:33:21 -0600304| Valid Image Extents | When creating an Image, ensure that image extents are within device limits for the specified format | LIMITS_VIOLATION | vkCreateImage | CreateImageLimitsViolationWidth | NA |
305| Valid Image Resource Size | When creating an image, ensure the the total image resource size is less than the queried device maximum resource size | LIMITS_VIOLATION | vkCreateImage | CreateImageResourceSizeViolation | NA |
Mike Stroyan43909d82015-09-25 13:39:21 -0600306| Alignment | When updating a buffer, data should be aligned on 4 byte boundaries | LIMITS_VIOLATION | vkCmdUpdateBuffer | UpdateBufferAlignment | NA |
307| Alignment | When filling a buffer, data should be aligned on 4 byte boundaries | LIMITS_VIOLATION | vkCmdFillBuffer | UpdateBufferAlignment | NA |
Tobin Ehlisc345b8b2015-09-03 09:50:06 -0600308| NA | Enum used for informational messages | NONE | | NA | None |
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600309
Jens Owenef5b8ed2015-08-25 12:29:34 -0400310### Device Limitations Pending Work
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600311
Mark Lobodzinskiddaecf82015-09-22 09:33:21 -0600312 1. For all Formats, call vkGetPhysicalDeviceFormatProperties to pull their properties for the underlying device. After that point, if the app attempts to use any formats in violation of those properties, flag errors (this is done for Images).
Tobin Ehlisa77845b2015-08-25 09:56:38 -0600313
Ian Elliottf81c2562015-09-25 15:50:55 -0600314## Swapchain
315
316### Swapchain Overview
317
318This layer is a work in progress. DeviceLimits layer is intended to capture two broad categories of errors:
319 1. Incorrect use of APIs to query device capabilities
320 2. Attempt to use API functionality beyond the capability of the underlying device
321
322For the first category, the layer tracks which calls are made and flags errors if calls are excluded that should not be, or if call sequencing is incorrect. An example is an app that assumes attempts to Query and use queues without ever having called vkGetPhysicalDeviceQueueFamilyProperties(). Also, if an app is calling vkGetPhysicalDeviceQueueFamilyProperties() to retrieve properties with some assumed count for array size instead of first calling vkGetPhysicalDeviceQueueFamilyProperties() w/ a NULL pQueueFamilyProperties parameter in order to query the actual count.
323For the second category of errors, DeviceLimits stores its own internal record of underlying device capabilities and flags errors if requests are made beyond those limits. Most (all?) of the limits are queried via vkGetPhysicalDevice* calls.
324
325### Swapchain Details Table
326
327| Check | Overview | ENUM SWAPCHAIN_* | Relevant API | Testname | Notes/TODO |
328| ----- | -------- | ---------------- | ------------ | -------- | ---------- |
329| Valid handle | If an invalid handle is used, this error will be flagged | INVALID_HANDLE | vkDestroyInstance vkEnumeratePhysicalDevices vkCreateDevice vkDestroyDevice vkGetPhysicalDeviceSurfaceSupportKHR vkGetSurfacePropertiesKHR vkGetSurfaceFormatsKHR vkGetSurfacePresentModesKHR vkCreateSwapchainKHR vkDestroySwapchainKHR vkGetSwapchainImagesKHR vkAcquireNextImageKHR vkQueuePresentKHR | NA | None |
330| Extension enabled before use | Validates that a WSI extension is enabled before its functions are used | EXT_NOT_ENABLED_BUT_USED | vkGetPhysicalDeviceSurfaceSupportKHR vkGetSurfacePropertiesKHR vkGetSurfaceFormatsKHR vkGetSurfacePresentModesKHR vkCreateSwapchainKHR vkDestroySwapchainKHR vkGetSwapchainImagesKHR vkAcquireNextImageKHR vkQueuePresentKHR | NA | None |
331| Swapchains destroyed before devices | Validates that vkDestroySwapchainKHR() is called for all swapchains associated with a device before vkDestroyDevice() is called | DEL_DEVICE_BEFORE_SWAPCHAINS | vkDestroyDevice | NA | None |
332| Queries occur before swapchain creation | Validates that vkGetSurfacePropertiesKHR(), vkGetSurfaceFormatsKHR() and vkGetSurfacePresentModesKHR() are called before vkCreateSwapchainKHR() | CREATE_SWAP_WITHOUT_QUERY | vkCreateSwapchainKHR | NA | None |
333| vkCreateSwapchainKHR(pCreateInfo->minImageCount) | Validates vkCreateSwapchainKHR(pCreateInfo->minImageCount) | CREATE_SWAP_BAD_MIN_IMG_COUNT | vkCreateSwapchainKHR | NA | None |
334| vkCreateSwapchainKHR(pCreateInfo->imageExtent) | Validates vkCreateSwapchainKHR(pCreateInfo->imageExtent) when window has no fixed size | CREATE_SWAP_OUT_OF_BOUNDS_EXTENTS | vkCreateSwapchainKHR | NA | None |
335| vkCreateSwapchainKHR(pCreateInfo->imageExtent) | Validates vkCreateSwapchainKHR(pCreateInfo->imageExtent) when window has a fixed size | CREATE_SWAP_EXTENTS_NO_MATCH_WIN | vkCreateSwapchainKHR | NA | None |
336| vkCreateSwapchainKHR(pCreateInfo->preTransform) | Validates vkCreateSwapchainKHR(pCreateInfo->preTransform) | CREATE_SWAP_BAD_PRE_TRANSFORM | vkCreateSwapchainKHR | NA | None |
337| vkCreateSwapchainKHR(pCreateInfo->imageArraySize) | Validates vkCreateSwapchainKHR(pCreateInfo->imageArraySize) | CREATE_SWAP_BAD_IMG_ARRAY_SIZE | vkCreateSwapchainKHR | NA | None |
338| vkCreateSwapchainKHR(pCreateInfo->imageUsageFlags) | Validates vkCreateSwapchainKHR(pCreateInfo->imageUsageFlags) | CREATE_SWAP_BAD_IMG_USAGE_FLAGS | vkCreateSwapchainKHR | NA | None |
339| vkCreateSwapchainKHR(pCreateInfo->imageColorSpace) | Validates vkCreateSwapchainKHR(pCreateInfo->imageColorSpace) | CREATE_SWAP_BAD_IMG_COLOR_SPACE | vkCreateSwapchainKHR | NA | None |
340| vkCreateSwapchainKHR(pCreateInfo->imageFormat) | Validates vkCreateSwapchainKHR(pCreateInfo->imageFormat) | CREATE_SWAP_BAD_IMG_FORMAT | vkCreateSwapchainKHR | NA | None |
341| vkCreateSwapchainKHR(pCreateInfo->imageFormat and pCreateInfo->imageColorSpace) | Validates vkCreateSwapchainKHR(pCreateInfo->imageFormat and pCreateInfo->imageColorSpace) | CREATE_SWAP_BAD_IMG_FMT_CLR_SP | vkCreateSwapchainKHR | NA | None |
342| vkCreateSwapchainKHR(pCreateInfo->presentMode) | Validates vkCreateSwapchainKHR(pCreateInfo->presentMode) | CREATE_SWAP_BAD_PRESENT_MODE | vkCreateSwapchainKHR | NA | None |
343| Use same device for swapchain | Validates that vkDestroySwapchainKHR() called with the same VkDevice as vkCreateSwapchainKHR() | DESTROY_SWAP_DIFF_DEVICE | vkDestroySwapchainKHR | NA | None |
344| Don't use too many images | Validates that app never tries to own too many swapchain images at a time | APP_OWNS_TOO_MANY_IMAGES | vkAcquireNextImageKHR | NA | None |
Ian Elliott7b7b61c2015-09-28 11:24:53 -0600345| Index too large | Validates that an image index is within the number of images in a swapchain | INDEX_TOO_LARGE | vkQueuePresentKHR | NA | None |
Ian Elliottf81c2562015-09-25 15:50:55 -0600346| Can't present a non-owned image | Validates that application only presents images that it owns | INDEX_NOT_IN_USE | vkQueuePresentKHR | NA | None |
347
348### Swapchain Pending Work
349Additional checks to be added to Swapchain
350
351 1. Check that the queue used for presenting was checked/valid during vkGetPhysicalDeviceSurfaceSupportKHR.
352 2. One issue that has already come up is correct UsageFlags for WSI SwapChains and SurfaceProperties.
353 3. Tons of other stuff including semaphore and synchronization validation.
354
Ian Elliott90805ae2015-09-25 16:19:06 -0600355# Non-validation Layer Details
356
357## APIDump
358
359APIDump layer is used for dumping a stream of all the Vulkan API calls that are made, along with details of the parameters to those calls.
360
361### APIDump Pending Work
362
363 1. vkAllocDescriptorSets does not correctly print out all of the created DescriptorSets (no array printing following main API txt)
364
Ian Elliottf81c2562015-09-25 15:50:55 -0600365
Tobin Ehlisc345b8b2015-09-03 09:50:06 -0600366## General Pending Work
367A place to capture general validation work to be done. This includes new checks that don't clearly fit into the above layers.
368
369 1. For Upcoming Dynamic State overhaul (if approved): If dynamic state value that is consumed is never set prior to consumption, flag an error
370 2. For Upcoming Dynamic State overhaul (if approved): If dynamic state that was bound as "static" in current PSO is attempted to be set with vkCmdSet* flag an error
Ian Elliottb6f09812015-09-25 16:20:23 -0600371 3. Need to check VkShaderCreateInfo.stage is being set properly (Issue reported by Dan Ginsberg)