From a065acff1f1b8e9d9a5590b924fb17858f118167 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Tue, 17 May 2016 08:01:41 -0600 Subject: [PATCH] layers: Migrate types from core_validation.h This change just moves a few types from core_validation.h to core_validation_types.h. This is preparation for migrating DescriptorSet class to store GLOBAL_CB_NODE ptrs directly. --- layers/core_validation.h | 290 +---------------------------------------- layers/core_validation_types.h | 290 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 291 insertions(+), 289 deletions(-) diff --git a/layers/core_validation.h b/layers/core_validation.h index 311736b..f0878f3 100644 --- a/layers/core_validation.h +++ b/layers/core_validation.h @@ -58,6 +58,7 @@ #include #include #include +#include #if MTMERGE @@ -97,12 +98,6 @@ struct MT_FB_ATTACHMENT_INFO { VkDeviceMemory mem; }; -struct MT_PASS_ATTACHMENT_INFO { - uint32_t attachment; - VkAttachmentLoadOp load_op; - VkAttachmentStoreOp store_op; -}; - struct MT_DESCRIPTOR_SET_INFO { std::vector images; std::vector buffers; @@ -113,17 +108,7 @@ struct MT_SWAP_CHAIN_INFO { VkSwapchainCreateInfoKHR createInfo; std::vector images; }; - #endif -typedef enum _DRAW_TYPE { - DRAW = 0, - DRAW_INDEXED = 1, - DRAW_INDIRECT = 2, - DRAW_INDEXED_INDIRECT = 3, - DRAW_BEGIN_RANGE = DRAW, - DRAW_END_RANGE = DRAW_INDEXED_INDIRECT, - NUM_DRAW_TYPES = (DRAW_END_RANGE - DRAW_BEGIN_RANGE + 1), -} DRAW_TYPE; typedef struct _SHADER_DS_MAPPING { uint32_t slotCount; @@ -140,59 +125,6 @@ typedef struct _IMAGE_LAYOUT_NODE { VkFormat format; } IMAGE_LAYOUT_NODE; -class IMAGE_CMD_BUF_LAYOUT_NODE { - public: - IMAGE_CMD_BUF_LAYOUT_NODE() {} - IMAGE_CMD_BUF_LAYOUT_NODE(VkImageLayout initialLayoutInput, VkImageLayout layoutInput) - : initialLayout(initialLayoutInput), layout(layoutInput) {} - - VkImageLayout initialLayout; - VkImageLayout layout; -}; - -// Store the DAG. -struct DAGNode { - uint32_t pass; - std::vector prev; - std::vector next; -}; - -struct RENDER_PASS_NODE { - VkRenderPass renderPass; - VkRenderPassCreateInfo const *pCreateInfo; - std::vector hasSelfDependency; - std::vector subpassToNode; - std::vector> subpassColorFormats; - std::vector attachments; - std::unordered_map attachment_first_read; - std::unordered_map attachment_first_layout; - - RENDER_PASS_NODE(VkRenderPassCreateInfo const *pCreateInfo) : pCreateInfo(pCreateInfo) { - uint32_t i; - - subpassColorFormats.reserve(pCreateInfo->subpassCount); - for (i = 0; i < pCreateInfo->subpassCount; i++) { - const VkSubpassDescription *subpass = &pCreateInfo->pSubpasses[i]; - std::vector color_formats; - uint32_t j; - - color_formats.reserve(subpass->colorAttachmentCount); - for (j = 0; j < subpass->colorAttachmentCount; j++) { - const uint32_t att = subpass->pColorAttachments[j].attachment; - - if (att != VK_ATTACHMENT_UNUSED) { - color_formats.push_back(pCreateInfo->pAttachments[att].format); - } - else { - color_formats.push_back(VK_FORMAT_UNDEFINED); - } - } - - subpassColorFormats.push_back(color_formats); - } - } -}; - // Store layouts and pushconstants for PipelineLayout struct PIPELINE_LAYOUT_NODE { std::vector descriptorSetLayouts; @@ -367,228 +299,8 @@ typedef struct _DESCRIPTOR_POOL_NODE { } } DESCRIPTOR_POOL_NODE; -// Cmd Buffer Tracking -typedef enum _CMD_TYPE { - CMD_BINDPIPELINE, - CMD_BINDPIPELINEDELTA, - CMD_SETVIEWPORTSTATE, - CMD_SETSCISSORSTATE, - CMD_SETLINEWIDTHSTATE, - CMD_SETDEPTHBIASSTATE, - CMD_SETBLENDSTATE, - CMD_SETDEPTHBOUNDSSTATE, - CMD_SETSTENCILREADMASKSTATE, - CMD_SETSTENCILWRITEMASKSTATE, - CMD_SETSTENCILREFERENCESTATE, - CMD_BINDDESCRIPTORSETS, - CMD_BINDINDEXBUFFER, - CMD_BINDVERTEXBUFFER, - CMD_DRAW, - CMD_DRAWINDEXED, - CMD_DRAWINDIRECT, - CMD_DRAWINDEXEDINDIRECT, - CMD_DISPATCH, - CMD_DISPATCHINDIRECT, - CMD_COPYBUFFER, - CMD_COPYIMAGE, - CMD_BLITIMAGE, - CMD_COPYBUFFERTOIMAGE, - CMD_COPYIMAGETOBUFFER, - CMD_CLONEIMAGEDATA, - CMD_UPDATEBUFFER, - CMD_FILLBUFFER, - CMD_CLEARCOLORIMAGE, - CMD_CLEARATTACHMENTS, - CMD_CLEARDEPTHSTENCILIMAGE, - CMD_RESOLVEIMAGE, - CMD_SETEVENT, - CMD_RESETEVENT, - CMD_WAITEVENTS, - CMD_PIPELINEBARRIER, - CMD_BEGINQUERY, - CMD_ENDQUERY, - CMD_RESETQUERYPOOL, - CMD_COPYQUERYPOOLRESULTS, - CMD_WRITETIMESTAMP, - CMD_PUSHCONSTANTS, - CMD_INITATOMICCOUNTERS, - CMD_LOADATOMICCOUNTERS, - CMD_SAVEATOMICCOUNTERS, - CMD_BEGINRENDERPASS, - CMD_NEXTSUBPASS, - CMD_ENDRENDERPASS, - CMD_EXECUTECOMMANDS, - CMD_END, // Should be last command in any RECORDED cmd buffer -} CMD_TYPE; -// Data structure for holding sequence of cmds in cmd buffer -typedef struct _CMD_NODE { - CMD_TYPE type; - uint64_t cmdNumber; -} CMD_NODE; - -typedef enum _CB_STATE { - CB_NEW, // Newly created CB w/o any cmds - CB_RECORDING, // BeginCB has been called on this CB - CB_RECORDED, // EndCB has been called on this CB - CB_INVALID // CB had a bound descriptor set destroyed or updated -} CB_STATE; -// CB Status -- used to track status of various bindings on cmd buffer objects -typedef VkFlags CBStatusFlags; -typedef enum _CBStatusFlagBits { - // clang-format off - CBSTATUS_NONE = 0x00000000, // No status is set - CBSTATUS_VIEWPORT_SET = 0x00000001, // Viewport has been set - CBSTATUS_LINE_WIDTH_SET = 0x00000002, // Line width has been set - CBSTATUS_DEPTH_BIAS_SET = 0x00000004, // Depth bias has been set - CBSTATUS_BLEND_CONSTANTS_SET = 0x00000008, // Blend constants state has been set - CBSTATUS_DEPTH_BOUNDS_SET = 0x00000010, // Depth bounds state object has been set - CBSTATUS_STENCIL_READ_MASK_SET = 0x00000020, // Stencil read mask has been set - CBSTATUS_STENCIL_WRITE_MASK_SET = 0x00000040, // Stencil write mask has been set - CBSTATUS_STENCIL_REFERENCE_SET = 0x00000080, // Stencil reference has been set - CBSTATUS_INDEX_BUFFER_BOUND = 0x00000100, // Index buffer has been set - CBSTATUS_SCISSOR_SET = 0x00000200, // Scissor has been set - CBSTATUS_ALL = 0x000003FF, // All dynamic state set - // clang-format on -} CBStatusFlagBits; - typedef struct stencil_data { uint32_t compareMask; uint32_t writeMask; uint32_t reference; } CBStencilData; - -typedef struct _DRAW_DATA { std::vector buffers; } DRAW_DATA; - -struct ImageSubresourcePair { - VkImage image; - bool hasSubresource; - VkImageSubresource subresource; -}; - -bool operator==(const ImageSubresourcePair &img1, const ImageSubresourcePair &img2) { - if (img1.image != img2.image || img1.hasSubresource != img2.hasSubresource) - return false; - return !img1.hasSubresource || - (img1.subresource.aspectMask == img2.subresource.aspectMask && img1.subresource.mipLevel == img2.subresource.mipLevel && - img1.subresource.arrayLayer == img2.subresource.arrayLayer); -} - -namespace std { -template <> struct hash { - size_t operator()(ImageSubresourcePair img) const throw() { - size_t hashVal = hash()(reinterpret_cast(img.image)); - hashVal ^= hash()(img.hasSubresource); - if (img.hasSubresource) { - hashVal ^= hash()(reinterpret_cast(img.subresource.aspectMask)); - hashVal ^= hash()(img.subresource.mipLevel); - hashVal ^= hash()(img.subresource.arrayLayer); - } - return hashVal; - } -}; -} - -struct QueryObject { - VkQueryPool pool; - uint32_t index; -}; - -bool operator==(const QueryObject &query1, const QueryObject &query2) { - return (query1.pool == query2.pool && query1.index == query2.index); -} - -namespace std { -template <> struct hash { - size_t operator()(QueryObject query) const throw() { - return hash()((uint64_t)(query.pool)) ^ hash()(query.index); - } -}; -} -// Track last states that are bound per pipeline bind point (Gfx & Compute) -struct LAST_BOUND_STATE { - VkPipeline pipeline; - VkPipelineLayout pipelineLayout; - // Track each set that has been bound - // TODO : can unique be global per CB? (do we care about Gfx vs. Compute?) - std::unordered_set uniqueBoundSets; - // Ordered bound set tracking where index is set# that given set is bound to - std::vector boundDescriptorSets; - // one dynamic offset per dynamic descriptor bound to this CB - std::vector> dynamicOffsets; - - void reset() { - pipeline = VK_NULL_HANDLE; - pipelineLayout = VK_NULL_HANDLE; - uniqueBoundSets.clear(); - boundDescriptorSets.clear(); - dynamicOffsets.clear(); - } -}; -// Cmd Buffer Wrapper Struct -struct GLOBAL_CB_NODE : public BASE_NODE { - VkCommandBuffer commandBuffer; - VkCommandBufferAllocateInfo createInfo; - VkCommandBufferBeginInfo beginInfo; - VkCommandBufferInheritanceInfo inheritanceInfo; - // VkFence fence; // fence tracking this cmd buffer - VkDevice device; // device this CB belongs to - uint64_t numCmds; // number of cmds in this CB - uint64_t drawCount[NUM_DRAW_TYPES]; // Count of each type of draw in this CB - CB_STATE state; // Track cmd buffer update state - uint64_t submitCount; // Number of times CB has been submitted - CBStatusFlags status; // Track status of various bindings on cmd buffer - std::vector cmds; // vector of commands bound to this command buffer - // Currently storing "lastBound" objects on per-CB basis - // long-term may want to create caches of "lastBound" states and could have - // each individual CMD_NODE referencing its own "lastBound" state - // VkPipeline lastBoundPipeline; - // VkPipelineLayout lastBoundPipelineLayout; - // // Capture unique std::set of descriptorSets that are bound to this CB. - // std::set uniqueBoundSets; - // vector boundDescriptorSets; // Index is set# that given set is bound to - // Store last bound state for Gfx & Compute pipeline bind points - LAST_BOUND_STATE lastBound[VK_PIPELINE_BIND_POINT_RANGE_SIZE]; - - std::vector viewports; - std::vector scissors; - VkRenderPassBeginInfo activeRenderPassBeginInfo; - uint64_t fenceId; - VkFence lastSubmittedFence; - VkQueue lastSubmittedQueue; - RENDER_PASS_NODE *activeRenderPass; - VkSubpassContents activeSubpassContents; - uint32_t activeSubpass; - VkFramebuffer activeFramebuffer; - std::unordered_set framebuffers; - // Track descriptor sets that are destroyed or updated while bound to CB - // TODO : These data structures relate to tracking resources that invalidate - // a cmd buffer that references them. Need to unify how we handle these - // cases so we don't have different tracking data for each type. - std::unordered_set destroyedSets; - std::unordered_set updatedSets; - std::unordered_set destroyedFramebuffers; - std::vector waitedEvents; - std::vector semaphores; - std::vector events; - std::unordered_map> waitedEventsBeforeQueryReset; - std::unordered_map queryToStateMap; // 0 is unavailable, 1 is available - std::unordered_set activeQueries; - std::unordered_set startedQueries; - std::unordered_map imageLayoutMap; - std::unordered_map> imageSubresourceMap; - std::unordered_map eventToStageMap; - std::vector drawData; - DRAW_DATA currentDrawData; - VkCommandBuffer primaryCommandBuffer; - // Track images and buffers that are updated by this CB at the point of a draw - std::unordered_set updateImages; - std::unordered_set updateBuffers; - // If cmd buffer is primary, track secondary command buffers pending - // execution - std::unordered_set secondaryCommandBuffers; - // MTMTODO : Scrub these data fields and merge active sets w/ lastBound as appropriate - std::vector> validate_functions; - std::unordered_set memObjs; - std::vector> eventUpdates; -}; - diff --git a/layers/core_validation_types.h b/layers/core_validation_types.h index 43f7de6..ff3a781 100644 --- a/layers/core_validation_types.h +++ b/layers/core_validation_types.h @@ -48,7 +48,9 @@ #include #include #include +#include #include +#include class BASE_NODE { public: @@ -147,4 +149,292 @@ class SWAPCHAIN_NODE { } ~SWAPCHAIN_NODE() { delete[] pQueueFamilyIndices; } }; +typedef enum _DRAW_TYPE { + DRAW = 0, + DRAW_INDEXED = 1, + DRAW_INDIRECT = 2, + DRAW_INDEXED_INDIRECT = 3, + DRAW_BEGIN_RANGE = DRAW, + DRAW_END_RANGE = DRAW_INDEXED_INDIRECT, + NUM_DRAW_TYPES = (DRAW_END_RANGE - DRAW_BEGIN_RANGE + 1), +} DRAW_TYPE; + +class IMAGE_CMD_BUF_LAYOUT_NODE { + public: + IMAGE_CMD_BUF_LAYOUT_NODE() {} + IMAGE_CMD_BUF_LAYOUT_NODE(VkImageLayout initialLayoutInput, VkImageLayout layoutInput) + : initialLayout(initialLayoutInput), layout(layoutInput) {} + + VkImageLayout initialLayout; + VkImageLayout layout; +}; + +struct MT_PASS_ATTACHMENT_INFO { + uint32_t attachment; + VkAttachmentLoadOp load_op; + VkAttachmentStoreOp store_op; +}; + +// Store the DAG. +struct DAGNode { + uint32_t pass; + std::vector prev; + std::vector next; +}; + +struct RENDER_PASS_NODE { + VkRenderPass renderPass; + VkRenderPassCreateInfo const *pCreateInfo; + std::vector hasSelfDependency; + std::vector subpassToNode; + std::vector> subpassColorFormats; + std::vector attachments; + std::unordered_map attachment_first_read; + std::unordered_map attachment_first_layout; + + RENDER_PASS_NODE(VkRenderPassCreateInfo const *pCreateInfo) : pCreateInfo(pCreateInfo) { + uint32_t i; + + subpassColorFormats.reserve(pCreateInfo->subpassCount); + for (i = 0; i < pCreateInfo->subpassCount; i++) { + const VkSubpassDescription *subpass = &pCreateInfo->pSubpasses[i]; + std::vector color_formats; + uint32_t j; + + color_formats.reserve(subpass->colorAttachmentCount); + for (j = 0; j < subpass->colorAttachmentCount; j++) { + const uint32_t att = subpass->pColorAttachments[j].attachment; + + if (att != VK_ATTACHMENT_UNUSED) { + color_formats.push_back(pCreateInfo->pAttachments[att].format); + } + else { + color_formats.push_back(VK_FORMAT_UNDEFINED); + } + } + + subpassColorFormats.push_back(color_formats); + } + } +}; +// Cmd Buffer Tracking +typedef enum _CMD_TYPE { + CMD_BINDPIPELINE, + CMD_BINDPIPELINEDELTA, + CMD_SETVIEWPORTSTATE, + CMD_SETSCISSORSTATE, + CMD_SETLINEWIDTHSTATE, + CMD_SETDEPTHBIASSTATE, + CMD_SETBLENDSTATE, + CMD_SETDEPTHBOUNDSSTATE, + CMD_SETSTENCILREADMASKSTATE, + CMD_SETSTENCILWRITEMASKSTATE, + CMD_SETSTENCILREFERENCESTATE, + CMD_BINDDESCRIPTORSETS, + CMD_BINDINDEXBUFFER, + CMD_BINDVERTEXBUFFER, + CMD_DRAW, + CMD_DRAWINDEXED, + CMD_DRAWINDIRECT, + CMD_DRAWINDEXEDINDIRECT, + CMD_DISPATCH, + CMD_DISPATCHINDIRECT, + CMD_COPYBUFFER, + CMD_COPYIMAGE, + CMD_BLITIMAGE, + CMD_COPYBUFFERTOIMAGE, + CMD_COPYIMAGETOBUFFER, + CMD_CLONEIMAGEDATA, + CMD_UPDATEBUFFER, + CMD_FILLBUFFER, + CMD_CLEARCOLORIMAGE, + CMD_CLEARATTACHMENTS, + CMD_CLEARDEPTHSTENCILIMAGE, + CMD_RESOLVEIMAGE, + CMD_SETEVENT, + CMD_RESETEVENT, + CMD_WAITEVENTS, + CMD_PIPELINEBARRIER, + CMD_BEGINQUERY, + CMD_ENDQUERY, + CMD_RESETQUERYPOOL, + CMD_COPYQUERYPOOLRESULTS, + CMD_WRITETIMESTAMP, + CMD_PUSHCONSTANTS, + CMD_INITATOMICCOUNTERS, + CMD_LOADATOMICCOUNTERS, + CMD_SAVEATOMICCOUNTERS, + CMD_BEGINRENDERPASS, + CMD_NEXTSUBPASS, + CMD_ENDRENDERPASS, + CMD_EXECUTECOMMANDS, + CMD_END, // Should be last command in any RECORDED cmd buffer +} CMD_TYPE; +// Data structure for holding sequence of cmds in cmd buffer +typedef struct _CMD_NODE { + CMD_TYPE type; + uint64_t cmdNumber; +} CMD_NODE; + +typedef enum _CB_STATE { + CB_NEW, // Newly created CB w/o any cmds + CB_RECORDING, // BeginCB has been called on this CB + CB_RECORDED, // EndCB has been called on this CB + CB_INVALID // CB had a bound descriptor set destroyed or updated +} CB_STATE; + +// CB Status -- used to track status of various bindings on cmd buffer objects +typedef VkFlags CBStatusFlags; +typedef enum _CBStatusFlagBits { + // clang-format off + CBSTATUS_NONE = 0x00000000, // No status is set + CBSTATUS_VIEWPORT_SET = 0x00000001, // Viewport has been set + CBSTATUS_LINE_WIDTH_SET = 0x00000002, // Line width has been set + CBSTATUS_DEPTH_BIAS_SET = 0x00000004, // Depth bias has been set + CBSTATUS_BLEND_CONSTANTS_SET = 0x00000008, // Blend constants state has been set + CBSTATUS_DEPTH_BOUNDS_SET = 0x00000010, // Depth bounds state object has been set + CBSTATUS_STENCIL_READ_MASK_SET = 0x00000020, // Stencil read mask has been set + CBSTATUS_STENCIL_WRITE_MASK_SET = 0x00000040, // Stencil write mask has been set + CBSTATUS_STENCIL_REFERENCE_SET = 0x00000080, // Stencil reference has been set + CBSTATUS_INDEX_BUFFER_BOUND = 0x00000100, // Index buffer has been set + CBSTATUS_SCISSOR_SET = 0x00000200, // Scissor has been set + CBSTATUS_ALL = 0x000003FF, // All dynamic state set + // clang-format on +} CBStatusFlagBits; + +// Track last states that are bound per pipeline bind point (Gfx & Compute) +struct LAST_BOUND_STATE { + VkPipeline pipeline; + VkPipelineLayout pipelineLayout; + // Track each set that has been bound + // TODO : can unique be global per CB? (do we care about Gfx vs. Compute?) + std::unordered_set uniqueBoundSets; + // Ordered bound set tracking where index is set# that given set is bound to + std::vector boundDescriptorSets; + // one dynamic offset per dynamic descriptor bound to this CB + std::vector> dynamicOffsets; + + void reset() { + pipeline = VK_NULL_HANDLE; + pipelineLayout = VK_NULL_HANDLE; + uniqueBoundSets.clear(); + boundDescriptorSets.clear(); + dynamicOffsets.clear(); + } +}; + +struct QueryObject { + VkQueryPool pool; + uint32_t index; +}; + +inline bool operator==(const QueryObject &query1, const QueryObject &query2) { + return (query1.pool == query2.pool && query1.index == query2.index); +} + +namespace std { +template <> struct hash { + size_t operator()(QueryObject query) const throw() { + return hash()((uint64_t)(query.pool)) ^ hash()(query.index); + } +}; +} +typedef struct _DRAW_DATA { std::vector buffers; } DRAW_DATA; + +struct ImageSubresourcePair { + VkImage image; + bool hasSubresource; + VkImageSubresource subresource; +}; + +inline bool operator==(const ImageSubresourcePair &img1, const ImageSubresourcePair &img2) { + if (img1.image != img2.image || img1.hasSubresource != img2.hasSubresource) + return false; + return !img1.hasSubresource || + (img1.subresource.aspectMask == img2.subresource.aspectMask && img1.subresource.mipLevel == img2.subresource.mipLevel && + img1.subresource.arrayLayer == img2.subresource.arrayLayer); +} + +namespace std { +template <> struct hash { + size_t operator()(ImageSubresourcePair img) const throw() { + size_t hashVal = hash()(reinterpret_cast(img.image)); + hashVal ^= hash()(img.hasSubresource); + if (img.hasSubresource) { + hashVal ^= hash()(reinterpret_cast(img.subresource.aspectMask)); + hashVal ^= hash()(img.subresource.mipLevel); + hashVal ^= hash()(img.subresource.arrayLayer); + } + return hashVal; + } +}; +} +// Cmd Buffer Wrapper Struct +struct GLOBAL_CB_NODE : public BASE_NODE { + VkCommandBuffer commandBuffer; + VkCommandBufferAllocateInfo createInfo; + VkCommandBufferBeginInfo beginInfo; + VkCommandBufferInheritanceInfo inheritanceInfo; + // VkFence fence; // fence tracking this cmd buffer + VkDevice device; // device this CB belongs to + uint64_t numCmds; // number of cmds in this CB + uint64_t drawCount[NUM_DRAW_TYPES]; // Count of each type of draw in this CB + CB_STATE state; // Track cmd buffer update state + uint64_t submitCount; // Number of times CB has been submitted + CBStatusFlags status; // Track status of various bindings on cmd buffer + std::vector cmds; // vector of commands bound to this command buffer + // Currently storing "lastBound" objects on per-CB basis + // long-term may want to create caches of "lastBound" states and could have + // each individual CMD_NODE referencing its own "lastBound" state + // VkPipeline lastBoundPipeline; + // VkPipelineLayout lastBoundPipelineLayout; + // // Capture unique std::set of descriptorSets that are bound to this CB. + // std::set uniqueBoundSets; + // vector boundDescriptorSets; // Index is set# that given set is bound to + // Store last bound state for Gfx & Compute pipeline bind points + LAST_BOUND_STATE lastBound[VK_PIPELINE_BIND_POINT_RANGE_SIZE]; + + std::vector viewports; + std::vector scissors; + VkRenderPassBeginInfo activeRenderPassBeginInfo; + uint64_t fenceId; + VkFence lastSubmittedFence; + VkQueue lastSubmittedQueue; + RENDER_PASS_NODE *activeRenderPass; + VkSubpassContents activeSubpassContents; + uint32_t activeSubpass; + VkFramebuffer activeFramebuffer; + std::unordered_set framebuffers; + // Track descriptor sets that are destroyed or updated while bound to CB + // TODO : These data structures relate to tracking resources that invalidate + // a cmd buffer that references them. Need to unify how we handle these + // cases so we don't have different tracking data for each type. + std::unordered_set destroyedSets; + std::unordered_set updatedSets; + std::unordered_set destroyedFramebuffers; + std::vector waitedEvents; + std::vector semaphores; + std::vector events; + std::unordered_map> waitedEventsBeforeQueryReset; + std::unordered_map queryToStateMap; // 0 is unavailable, 1 is available + std::unordered_set activeQueries; + std::unordered_set startedQueries; + std::unordered_map imageLayoutMap; + std::unordered_map> imageSubresourceMap; + std::unordered_map eventToStageMap; + std::vector drawData; + DRAW_DATA currentDrawData; + VkCommandBuffer primaryCommandBuffer; + // Track images and buffers that are updated by this CB at the point of a draw + std::unordered_set updateImages; + std::unordered_set updateBuffers; + // If cmd buffer is primary, track secondary command buffers pending + // execution + std::unordered_set secondaryCommandBuffers; + // MTMTODO : Scrub these data fields and merge active sets w/ lastBound as appropriate + std::vector> validate_functions; + std::unordered_set memObjs; + std::vector> eventUpdates; +}; + #endif // CORE_VALIDATION_TYPES_H_ \ No newline at end of file -- 2.7.4