Lines Matching refs:pCB

2161 static VkBool32 hasDrawCmd(GLOBAL_CB_NODE *pCB) {  in hasDrawCmd()  argument
2163 if (pCB->drawCount[i]) in hasDrawCmd()
2204 static VkBool32 validate_draw_state_flags(layer_data *my_data, GLOBAL_CB_NODE *pCB, VkBool32 indexe… in validate_draw_state_flags() argument
2207 …validate_status(my_data, pCB, CBSTATUS_NONE, CBSTATUS_VIEWPORT_SET, CBSTATUS_VIEWPORT_SET, VK_DEBU… in validate_draw_state_flags()
2210 …validate_status(my_data, pCB, CBSTATUS_NONE, CBSTATUS_SCISSOR_SET, CBSTATUS_SCISSOR_SET, VK_DEBUG_… in validate_draw_state_flags()
2212 …result |= validate_status(my_data, pCB, CBSTATUS_NONE, CBSTATUS_LINE_WIDTH_SET, CBSTATUS_LINE_WIDT… in validate_draw_state_flags()
2215 …result |= validate_status(my_data, pCB, CBSTATUS_NONE, CBSTATUS_DEPTH_BIAS_SET, CBSTATUS_DEPTH_BIA… in validate_draw_state_flags()
2218 …result |= validate_status(my_data, pCB, CBSTATUS_COLOR_BLEND_WRITE_ENABLE, CBSTATUS_BLEND_SET, CBS… in validate_draw_state_flags()
2221 …result |= validate_status(my_data, pCB, CBSTATUS_DEPTH_WRITE_ENABLE, CBSTATUS_DEPTH_BOUNDS_SET, CB… in validate_draw_state_flags()
2224 …result |= validate_status(my_data, pCB, CBSTATUS_STENCIL_TEST_ENABLE, CBSTATUS_STENCIL_READ_MASK_S… in validate_draw_state_flags()
2227 …result |= validate_status(my_data, pCB, CBSTATUS_STENCIL_TEST_ENABLE, CBSTATUS_STENCIL_WRITE_MASK_… in validate_draw_state_flags()
2230 …result |= validate_status(my_data, pCB, CBSTATUS_STENCIL_TEST_ENABLE, CBSTATUS_STENCIL_REFERENCE_S… in validate_draw_state_flags()
2234 …result |= validate_status(my_data, pCB, CBSTATUS_NONE, CBSTATUS_INDEX_BUFFER_BOUND, CBSTATUS_INDEX… in validate_draw_state_flags()
2818 static VkBool32 validate_dynamic_offsets(layer_data *my_data, const GLOBAL_CB_NODE *pCB, const vect… in validate_dynamic_offsets() argument
2835 …uint32_t dynOffset = pCB->lastBound[VK_PIPELINE_BIND_POINT_GRAPHICS].dynamicOffsets[dynOffsetIndex… in validate_dynamic_offsets()
2847pCB->dynamicOffsets[dynOffsetIndex], pWDS->pBufferInfo[j].offset, in validate_dynamic_offsets()
2860 … reinterpret_cast<const uint64_t &>(set_node->set), i, pCB->dynamicOffsets[dynOffsetIndex], in validate_dynamic_offsets()
2873 … reinterpret_cast<const uint64_t &>(set_node->set), i, pCB->dynamicOffsets[dynOffsetIndex], in validate_dynamic_offsets()
2894 static VkBool32 validate_draw_state(layer_data *my_data, GLOBAL_CB_NODE *pCB, VkBool32 indexedDraw)… in validate_draw_state() argument
2896 VkBool32 result = validate_draw_state_flags(my_data, pCB, indexedDraw); in validate_draw_state()
2897 …PIPELINE_NODE *pPipe = getPipeline(my_data, pCB->lastBound[VK_PIPELINE_BIND_POINT_GRAPHICS].pipeli… in validate_draw_state()
2903 auto const &state = pCB->lastBound[VK_PIPELINE_BIND_POINT_GRAPHICS]; in validate_draw_state()
2943 result |= validate_dynamic_offsets(my_data, pCB, activeSetNodes); in validate_draw_state()
2948 …if ((pCB->currentDrawData.buffers.size() < (i + 1)) || (pCB->currentDrawData.buffers[i] == VK_NULL… in validate_draw_state()
2954 … (uint64_t)pCB->lastBound[VK_PIPELINE_BIND_POINT_GRAPHICS].pipeline, i); in validate_draw_state()
2958 if (!pCB->currentDrawData.buffers.empty()) { in validate_draw_state()
2963 … (uint64_t)pCB->commandBuffer, (uint64_t)pCB->lastBound[VK_PIPELINE_BIND_POINT_GRAPHICS].pipeline); in validate_draw_state()
2974 … if (pCB->viewports.size() != pPipe->graphicsPipelineCI.pViewportState->viewportCount) { in validate_draw_state()
2979pCB->viewports.size(), pPipe->graphicsPipelineCI.pViewportState->viewportCount); in validate_draw_state()
2983 … if (pCB->scissors.size() != pPipe->graphicsPipelineCI.pViewportState->scissorCount) { in validate_draw_state()
2988pCB->scissors.size(), pPipe->graphicsPipelineCI.pViewportState->scissorCount); in validate_draw_state()
3318 static VkBool32 validatePipelineState(layer_data *my_data, const GLOBAL_CB_NODE *pCB, const VkPipel… in validatePipelineState() argument
3327 if (pCB->activeRenderPass) { in validatePipelineState()
3328 … const VkRenderPassCreateInfo *pRPCI = my_data->renderPassMap[pCB->activeRenderPass]->pCreateInfo; in validatePipelineState()
3329 const VkSubpassDescription *pSD = &pRPCI->pSubpasses[pCB->activeSubpass]; in validatePipelineState()
3360 … (uint64_t)pipeline, psoNumSamples, (uint64_t)pCB->activeRenderPass, subpassNumSamples); in validatePipelineState()
3581 bool FindLayout(const GLOBAL_CB_NODE *pCB, VkImage image, VkImageSubresource range, IMAGE_CMD_BUF_L… in FindLayout() argument
3583 auto imgsubIt = pCB->imageLayoutMap.find(imgpair); in FindLayout()
3584 if (imgsubIt == pCB->imageLayoutMap.end()) { in FindLayout()
3586 imgsubIt = pCB->imageLayoutMap.find(imgpair); in FindLayout()
3587 if (imgsubIt == pCB->imageLayoutMap.end()) in FindLayout()
3659 void SetLayout(GLOBAL_CB_NODE *pCB, VkImage image, ImageSubresourcePair imgpair, const IMAGE_CMD_BU… in SetLayout() argument
3660 pCB->imageLayoutMap[imgpair] = node; in SetLayout()
3662 …auto subresource = std::find(pCB->imageSubresourceMap[image].begin(), pCB->imageSubresourceMap[ima… in SetLayout()
3663 if (subresource == pCB->imageSubresourceMap[image].end()) { in SetLayout()
3664 pCB->imageSubresourceMap[image].push_back(imgpair); in SetLayout()
3668 void SetLayout(GLOBAL_CB_NODE *pCB, VkImage image, ImageSubresourcePair imgpair, const VkImageLayou… in SetLayout() argument
3670 …if (std::find(pCB->imageSubresourceMap[image].begin(), pCB->imageSubresourceMap[image].end(), imgp… in SetLayout()
3671 pCB->imageSubresourceMap[image].end()) { in SetLayout()
3672 pCB->imageLayoutMap[imgpair].layout = layout; in SetLayout()
3677 FindLayout(pCB, image, imgpair.subresource, node); in SetLayout()
3678 SetLayout(pCB, image, imgpair, {node.initialLayout, layout}); in SetLayout()
3682 void SetLayout(GLOBAL_CB_NODE *pCB, VkImage image, const IMAGE_CMD_BUF_LAYOUT_NODE &node) { in SetLayout() argument
3684 SetLayout(pCB, image, imgpair, node); in SetLayout()
3687 void SetLayout(GLOBAL_CB_NODE *pCB, VkImage image, VkImageSubresource range, const IMAGE_CMD_BUF_LA… in SetLayout() argument
3689 SetLayout(pCB, image, imgpair, node); in SetLayout()
3692 void SetLayout(GLOBAL_CB_NODE *pCB, VkImage image, const VkImageLayout &layout) { in SetLayout() argument
3694 SetLayout(pCB, image, imgpair, layout); in SetLayout()
3697 void SetLayout(GLOBAL_CB_NODE *pCB, VkImage image, VkImageSubresource range, const VkImageLayout &l… in SetLayout() argument
3699 SetLayout(pCB, image, imgpair, layout); in SetLayout()
3702 void SetLayout(const layer_data *dev_data, GLOBAL_CB_NODE *pCB, VkImageView imageView, const VkImag… in SetLayout() argument
3713 SetLayout(pCB, image, sub, layout); in SetLayout()
4307 VkBool32 validateCmdsInCmdBuffer(const layer_data *dev_data, const GLOBAL_CB_NODE *pCB, const CMD_T… in validateCmdsInCmdBuffer() argument
4308 if (!pCB->activeRenderPass) in validateCmdsInCmdBuffer()
4311 …if (pCB->activeSubpassContents == VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS && cmd_type != CMD… in validateCmdsInCmdBuffer()
4315 …} else if (pCB->activeSubpassContents == VK_SUBPASS_CONTENTS_INLINE && cmd_type == CMD_EXECUTECOMM… in validateCmdsInCmdBuffer()
4349 static VkBool32 addCmd(const layer_data *my_data, GLOBAL_CB_NODE *pCB, const CMD_TYPE cmd, const ch… in addCmd() argument
4351 auto pool_data = my_data->commandPoolMap.find(pCB->createInfo.commandPool); in addCmd()
4411 if (pCB->state != CB_RECORDING) { in addCmd()
4412 skipCall |= report_error_no_cb_begin(my_data, pCB->commandBuffer, caller_name); in addCmd()
4413 skipCall |= validateCmdsInCmdBuffer(my_data, pCB, cmd); in addCmd()
4416 cmdNode.cmdNumber = ++pCB->numCmds; in addCmd()
4418 pCB->cmds.push_back(cmdNode); in addCmd()
4425 GLOBAL_CB_NODE *pCB = my_data->commandBufferMap[cb]; in resetCB() local
4426 if (pCB) { in resetCB()
4427 pCB->cmds.clear(); in resetCB()
4429 pCB->commandBuffer = cb; in resetCB()
4430 memset(&pCB->beginInfo, 0, sizeof(VkCommandBufferBeginInfo)); in resetCB()
4431 memset(&pCB->inheritanceInfo, 0, sizeof(VkCommandBufferInheritanceInfo)); in resetCB()
4432 pCB->numCmds = 0; in resetCB()
4433 memset(pCB->drawCount, 0, NUM_DRAW_TYPES * sizeof(uint64_t)); in resetCB()
4434 pCB->state = CB_NEW; in resetCB()
4435 pCB->submitCount = 0; in resetCB()
4436 pCB->status = 0; in resetCB()
4437 pCB->viewports.clear(); in resetCB()
4438 pCB->scissors.clear(); in resetCB()
4441 for (auto set : pCB->lastBound[i].uniqueBoundSets) { in resetCB()
4444 set_node->second->boundCmdBuffers.erase(pCB->commandBuffer); in resetCB()
4447 pCB->lastBound[i].reset(); in resetCB()
4449 memset(&pCB->activeRenderPassBeginInfo, 0, sizeof(pCB->activeRenderPassBeginInfo)); in resetCB()
4450 pCB->activeRenderPass = 0; in resetCB()
4451 pCB->activeSubpassContents = VK_SUBPASS_CONTENTS_INLINE; in resetCB()
4452 pCB->activeSubpass = 0; in resetCB()
4453 pCB->framebuffer = 0; in resetCB()
4454 pCB->fenceId = 0; in resetCB()
4455 pCB->lastSubmittedFence = VK_NULL_HANDLE; in resetCB()
4456 pCB->lastSubmittedQueue = VK_NULL_HANDLE; in resetCB()
4457 pCB->destroyedSets.clear(); in resetCB()
4458 pCB->updatedSets.clear(); in resetCB()
4459 pCB->destroyedFramebuffers.clear(); in resetCB()
4460 pCB->waitedEvents.clear(); in resetCB()
4461 pCB->semaphores.clear(); in resetCB()
4462 pCB->events.clear(); in resetCB()
4463 pCB->waitedEventsBeforeQueryReset.clear(); in resetCB()
4464 pCB->queryToStateMap.clear(); in resetCB()
4465 pCB->activeQueries.clear(); in resetCB()
4466 pCB->startedQueries.clear(); in resetCB()
4467 pCB->imageLayoutMap.clear(); in resetCB()
4468 pCB->eventToStageMap.clear(); in resetCB()
4469 pCB->drawData.clear(); in resetCB()
4470 pCB->currentDrawData.buffers.clear(); in resetCB()
4471 pCB->primaryCommandBuffer = VK_NULL_HANDLE; in resetCB()
4472 pCB->secondaryCommandBuffers.clear(); in resetCB()
4473 pCB->activeDescriptorSets.clear(); in resetCB()
4474 pCB->validate_functions.clear(); in resetCB()
4475 pCB->pMemObjList.clear(); in resetCB()
4476 pCB->eventUpdates.clear(); in resetCB()
4481 static void set_cb_pso_status(GLOBAL_CB_NODE *pCB, const PIPELINE_NODE *pPipe) { in set_cb_pso_status() argument
4484 pCB->status |= CBSTATUS_COLOR_BLEND_WRITE_ENABLE; in set_cb_pso_status()
4488 pCB->status |= CBSTATUS_DEPTH_WRITE_ENABLE; in set_cb_pso_status()
4491 pCB->status |= CBSTATUS_STENCIL_TEST_ENABLE; in set_cb_pso_status()
4495 pCB->status = CBSTATUS_ALL; in set_cb_pso_status()
4535 pCB->status |= psoDynStateMask; in set_cb_pso_status()
4542 GLOBAL_CB_NODE *pCB = getCBNode(my_data, cb); in printPipeline() local
4543 if (pCB) { in printPipeline()
4544 …PIPELINE_NODE *pPipeTrav = getPipeline(my_data, pCB->lastBound[VK_PIPELINE_BIND_POINT_GRAPHICS].pi… in printPipeline()
4557 GLOBAL_CB_NODE *pCB = getCBNode(my_data, cb); in printCB() local
4558 if (pCB && pCB->cmds.size() > 0) { in printCB()
4561 vector<CMD_NODE> cmds = pCB->cmds; in printCB()
4583 static VkBool32 insideRenderPass(const layer_data *my_data, GLOBAL_CB_NODE *pCB, const char *apiNam… in insideRenderPass() argument
4585 if (pCB->activeRenderPass) { in insideRenderPass()
4587 … (uint64_t)pCB->commandBuffer, __LINE__, DRAWSTATE_INVALID_RENDERPASS_CMD, "DS", in insideRenderPass()
4589 (uint64_t)pCB->activeRenderPass); in insideRenderPass()
4596 static VkBool32 outsideRenderPass(const layer_data *my_data, GLOBAL_CB_NODE *pCB, const char *apiNa… in outsideRenderPass() argument
4598 if (((pCB->createInfo.level == VK_COMMAND_BUFFER_LEVEL_PRIMARY) && (!pCB->activeRenderPass)) || in outsideRenderPass()
4599 ((pCB->createInfo.level == VK_COMMAND_BUFFER_LEVEL_SECONDARY) && (!pCB->activeRenderPass) && in outsideRenderPass()
4600 !(pCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT))) { in outsideRenderPass()
4602 … (uint64_t)pCB->commandBuffer, __LINE__, DRAWSTATE_NO_ACTIVE_RENDERPASS, "DS", in outsideRenderPass()
4869 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, cmdBuffer); in ValidateCmdBufImageLayouts() local
4870 for (auto cb_image_data : pCB->imageLayoutMap) { in ValidateCmdBufImageLayouts()
4893 VkBool32 validateAndIncrementResources(layer_data *my_data, GLOBAL_CB_NODE *pCB) { in validateAndIncrementResources() argument
4895 for (auto drawDataElement : pCB->drawData) { in validateAndIncrementResources()
4908 for (auto set : pCB->lastBound[i].uniqueBoundSets) { in validateAndIncrementResources()
4920 for (auto semaphore : pCB->semaphores) { in validateAndIncrementResources()
4931 for (auto event : pCB->events) { in validateAndIncrementResources()
4946 GLOBAL_CB_NODE *pCB = getCBNode(my_data, cmdBuffer); in decrementResources() local
4947 for (auto drawDataElement : pCB->drawData) { in decrementResources()
4956 for (auto set : pCB->lastBound[i].uniqueBoundSets) { in decrementResources()
4963 for (auto semaphore : pCB->semaphores) { in decrementResources()
4969 for (auto event : pCB->events) { in decrementResources()
4975 for (auto queryStatePair : pCB->queryToStateMap) { in decrementResources()
4978 for (auto eventStagePair : pCB->eventToStageMap) { in decrementResources()
5100 bool validateCommandBufferSimultaneousUse(layer_data *dev_data, GLOBAL_CB_NODE *pCB) { in validateCommandBufferSimultaneousUse() argument
5102 if (dev_data->globalInFlightCmdBuffers.count(pCB->commandBuffer) && in validateCommandBufferSimultaneousUse()
5103 !(pCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT)) { in validateCommandBufferSimultaneousUse()
5108 reinterpret_cast<uint64_t>(pCB->commandBuffer)); in validateCommandBufferSimultaneousUse()
5113 static bool validateCommandBufferState(layer_data *dev_data, GLOBAL_CB_NODE *pCB) { in validateCommandBufferState() argument
5116 if (CB_RECORDED != pCB->state) { in validateCommandBufferState()
5117 if (CB_INVALID == pCB->state) { in validateCommandBufferState()
5120 if (!pCB->destroyedSets.empty()) { in validateCommandBufferState()
5122 for (auto set : pCB->destroyedSets) in validateCommandBufferState()
5127 … (uint64_t)(pCB->commandBuffer), __LINE__, DRAWSTATE_INVALID_COMMAND_BUFFER, "DS", in validateCommandBufferState()
5130 (uint64_t)(pCB->commandBuffer), set_string.str().c_str()); in validateCommandBufferState()
5133 if (!pCB->updatedSets.empty()) { in validateCommandBufferState()
5135 for (auto set : pCB->updatedSets) in validateCommandBufferState()
5140 … (uint64_t)(pCB->commandBuffer), __LINE__, DRAWSTATE_INVALID_COMMAND_BUFFER, "DS", in validateCommandBufferState()
5143 (uint64_t)(pCB->commandBuffer), set_string.str().c_str()); in validateCommandBufferState()
5146 if (!pCB->destroyedFramebuffers.empty()) { in validateCommandBufferState()
5148 for (auto fb : pCB->destroyedFramebuffers) in validateCommandBufferState()
5153 …reinterpret_cast<uint64_t &>(pCB->commandBuffer), __LINE__, DRAWSTATE_INVALID_COMMAND_BUFFER, "DS", in validateCommandBufferState()
5156 … reinterpret_cast<uint64_t &>(pCB->commandBuffer), fb_string.str().c_str()); in validateCommandBufferState()
5166 …reinterpret_cast<uint64_t &>(pCB->commandBuffer), __LINE__, DRAWSTATE_INVALID_COMMAND_BUFFER, "DS", in validateCommandBufferState()
5170 reinterpret_cast<uint64_t &>(pCB->commandBuffer)); in validateCommandBufferState()
5175 … (uint64_t)(pCB->commandBuffer), __LINE__, DRAWSTATE_NO_END_COMMAND_BUFFER, "DS", in validateCommandBufferState()
5177 (uint64_t)(pCB->commandBuffer)); in validateCommandBufferState()
5183 static VkBool32 validatePrimaryCommandBufferState(layer_data *dev_data, GLOBAL_CB_NODE *pCB) { in validatePrimaryCommandBufferState() argument
5185 VkBool32 skipCall = validateAndIncrementResources(dev_data, pCB); in validatePrimaryCommandBufferState()
5186 if (!pCB->secondaryCommandBuffers.empty()) { in validatePrimaryCommandBufferState()
5187 for (auto secondaryCmdBuffer : pCB->secondaryCommandBuffers) { in validatePrimaryCommandBufferState()
5190 if (pSubCB->primaryCommandBuffer != pCB->commandBuffer) { in validatePrimaryCommandBufferState()
5196 … reinterpret_cast<uint64_t>(pCB->commandBuffer), reinterpret_cast<uint64_t>(secondaryCmdBuffer), in validatePrimaryCommandBufferState()
5204 …if ((pCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT) && (pCB->submitCount > 1)… in validatePrimaryCommandBufferState()
5209 (uint64_t)(pCB->commandBuffer), pCB->submitCount); in validatePrimaryCommandBufferState()
5211 skipCall |= validateCommandBufferState(dev_data, pCB); in validatePrimaryCommandBufferState()
5214 skipCall |= validateCommandBufferSimultaneousUse(dev_data, pCB); in validatePrimaryCommandBufferState()
5475 GLOBAL_CB_NODE *pCB = getCBNode(my_data, cmdBuffer); in cleanInFlightCmdBuffer() local
5476 if (pCB) { in cleanInFlightCmdBuffer()
5477 for (auto queryEventsPair : pCB->waitedEventsBeforeQueryReset) { in cleanInFlightCmdBuffer()
5753 GLOBAL_CB_NODE *pCB = nullptr; in vkGetQueryPoolResults() local
5756 pCB = getCBNode(dev_data, cmdBuffer); in vkGetQueryPoolResults()
5757 for (auto queryStatePair : pCB->queryToStateMap) { in vkGetQueryPoolResults()
5772 pCB = getCBNode(dev_data, cmdBuffer); in vkGetQueryPoolResults()
5773 auto queryEventElement = pCB->waitedEventsBeforeQueryReset.find(query); in vkGetQueryPoolResults()
5774 if (queryEventElement == pCB->waitedEventsBeforeQueryReset.end()) { in vkGetQueryPoolResults()
5791 pCB = getCBNode(dev_data, cmdBuffer); in vkGetQueryPoolResults()
5792 make_available |= pCB->queryToStateMap[query]; in vkGetQueryPoolResults()
6893 GLOBAL_CB_NODE *pCB = new GLOBAL_CB_NODE; in vkAllocateCommandBuffers() local
6895 dev_data->commandBufferMap[pCommandBuffer[i]] = pCB; in vkAllocateCommandBuffers()
6897 pCB->createInfo = *pCreateInfo; in vkAllocateCommandBuffers()
6898 pCB->device = device; in vkAllocateCommandBuffers()
6915 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkBeginCommandBuffer() local
6916 if (pCB) { in vkBeginCommandBuffer()
6931 if (pCB->createInfo.level != VK_COMMAND_BUFFER_LEVEL_PRIMARY) { in vkBeginCommandBuffer()
6976 fbNode->second.referencingCmdBuffers.insert(pCB->commandBuffer); in vkBeginCommandBuffer()
7006 if (CB_RECORDING == pCB->state) { in vkBeginCommandBuffer()
7013 } else if (CB_RECORDED == pCB->state) { in vkBeginCommandBuffer()
7014 VkCommandPool cmdPool = pCB->createInfo.commandPool; in vkBeginCommandBuffer()
7027 pCB->state = CB_RECORDING; in vkBeginCommandBuffer()
7028 pCB->beginInfo = *pBeginInfo; in vkBeginCommandBuffer()
7029 if (pCB->beginInfo.pInheritanceInfo) { in vkBeginCommandBuffer()
7030 pCB->inheritanceInfo = *(pCB->beginInfo.pInheritanceInfo); in vkBeginCommandBuffer()
7031 pCB->beginInfo.pInheritanceInfo = &pCB->inheritanceInfo; in vkBeginCommandBuffer()
7056 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkEndCommandBuffer() local
7057 if (pCB) { in vkEndCommandBuffer()
7058 if (pCB->state != CB_RECORDING) { in vkEndCommandBuffer()
7061 for (auto query : pCB->activeQueries) { in vkEndCommandBuffer()
7073 pCB->state = CB_RECORDED; in vkEndCommandBuffer()
7075 pCB->status = 0; in vkEndCommandBuffer()
7104 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkResetCommandBuffer() local
7105 VkCommandPool cmdPool = pCB->createInfo.commandPool; in vkResetCommandBuffer()
7139 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdBindPipeline() local
7140 if (pCB) { in vkCmdBindPipeline()
7141 skipCall |= addCmd(dev_data, pCB, CMD_BINDPIPELINE, "vkCmdBindPipeline()"); in vkCmdBindPipeline()
7142 if ((VK_PIPELINE_BIND_POINT_COMPUTE == pipelineBindPoint) && (pCB->activeRenderPass)) { in vkCmdBindPipeline()
7147 (uint64_t)pipeline, (uint64_t)pCB->activeRenderPass); in vkCmdBindPipeline()
7152 pCB->lastBound[pipelineBindPoint].pipeline = pipeline; in vkCmdBindPipeline()
7153 set_cb_pso_status(pCB, pPN); in vkCmdBindPipeline()
7154 skipCall |= validatePipelineState(dev_data, pCB, pipelineBindPoint, pipeline); in vkCmdBindPipeline()
7171 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdSetViewport() local
7172 if (pCB) { in vkCmdSetViewport()
7173 skipCall |= addCmd(dev_data, pCB, CMD_SETVIEWPORTSTATE, "vkCmdSetViewport()"); in vkCmdSetViewport()
7174 pCB->status |= CBSTATUS_VIEWPORT_SET; in vkCmdSetViewport()
7175 pCB->viewports.resize(viewportCount); in vkCmdSetViewport()
7176 memcpy(pCB->viewports.data(), pViewports, viewportCount * sizeof(VkViewport)); in vkCmdSetViewport()
7188 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdSetScissor() local
7189 if (pCB) { in vkCmdSetScissor()
7190 skipCall |= addCmd(dev_data, pCB, CMD_SETSCISSORSTATE, "vkCmdSetScissor()"); in vkCmdSetScissor()
7191 pCB->status |= CBSTATUS_SCISSOR_SET; in vkCmdSetScissor()
7192 pCB->scissors.resize(scissorCount); in vkCmdSetScissor()
7193 memcpy(pCB->scissors.data(), pScissors, scissorCount * sizeof(VkRect2D)); in vkCmdSetScissor()
7204 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdSetLineWidth() local
7205 if (pCB) { in vkCmdSetLineWidth()
7206 skipCall |= addCmd(dev_data, pCB, CMD_SETLINEWIDTHSTATE, "vkCmdSetLineWidth()"); in vkCmdSetLineWidth()
7207 pCB->status |= CBSTATUS_LINE_WIDTH_SET; in vkCmdSetLineWidth()
7219 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdSetDepthBias() local
7220 if (pCB) { in vkCmdSetDepthBias()
7221 skipCall |= addCmd(dev_data, pCB, CMD_SETDEPTHBIASSTATE, "vkCmdSetDepthBias()"); in vkCmdSetDepthBias()
7222 pCB->status |= CBSTATUS_DEPTH_BIAS_SET; in vkCmdSetDepthBias()
7234 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdSetBlendConstants() local
7235 if (pCB) { in vkCmdSetBlendConstants()
7236 skipCall |= addCmd(dev_data, pCB, CMD_SETBLENDSTATE, "vkCmdSetBlendConstants()"); in vkCmdSetBlendConstants()
7237 pCB->status |= CBSTATUS_BLEND_SET; in vkCmdSetBlendConstants()
7249 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdSetDepthBounds() local
7250 if (pCB) { in vkCmdSetDepthBounds()
7251 skipCall |= addCmd(dev_data, pCB, CMD_SETDEPTHBOUNDSSTATE, "vkCmdSetDepthBounds()"); in vkCmdSetDepthBounds()
7252 pCB->status |= CBSTATUS_DEPTH_BOUNDS_SET; in vkCmdSetDepthBounds()
7264 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdSetStencilCompareMask() local
7265 if (pCB) { in vkCmdSetStencilCompareMask()
7266 … skipCall |= addCmd(dev_data, pCB, CMD_SETSTENCILREADMASKSTATE, "vkCmdSetStencilCompareMask()"); in vkCmdSetStencilCompareMask()
7267 pCB->status |= CBSTATUS_STENCIL_READ_MASK_SET; in vkCmdSetStencilCompareMask()
7279 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdSetStencilWriteMask() local
7280 if (pCB) { in vkCmdSetStencilWriteMask()
7281 … skipCall |= addCmd(dev_data, pCB, CMD_SETSTENCILWRITEMASKSTATE, "vkCmdSetStencilWriteMask()"); in vkCmdSetStencilWriteMask()
7282 pCB->status |= CBSTATUS_STENCIL_WRITE_MASK_SET; in vkCmdSetStencilWriteMask()
7294 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdSetStencilReference() local
7295 if (pCB) { in vkCmdSetStencilReference()
7296 … skipCall |= addCmd(dev_data, pCB, CMD_SETSTENCILREFERENCESTATE, "vkCmdSetStencilReference()"); in vkCmdSetStencilReference()
7297 pCB->status |= CBSTATUS_STENCIL_REFERENCE_SET; in vkCmdSetStencilReference()
7326 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdBindDescriptorSets() local
7327 if (pCB) { in vkCmdBindDescriptorSets()
7328 if (pCB->state == CB_RECORDING) { in vkCmdBindDescriptorSets()
7333 if (lastSetIndex >= pCB->lastBound[pipelineBindPoint].boundDescriptorSets.size()) in vkCmdBindDescriptorSets()
7334 pCB->lastBound[pipelineBindPoint].boundDescriptorSets.resize(lastSetIndex + 1); in vkCmdBindDescriptorSets()
7335 …VkDescriptorSet oldFinalBoundSet = pCB->lastBound[pipelineBindPoint].boundDescriptorSets[lastSetIn… in vkCmdBindDescriptorSets()
7339 pCB->lastBound[pipelineBindPoint].uniqueBoundSets.insert(pDescriptorSets[i]); in vkCmdBindDescriptorSets()
7341 pCB->lastBound[pipelineBindPoint].pipelineLayout = layout; in vkCmdBindDescriptorSets()
7342pCB->lastBound[pipelineBindPoint].boundDescriptorSets[i + firstSet] = pDescriptorSets[i]; in vkCmdBindDescriptorSets()
7422 … skipCall |= addCmd(dev_data, pCB, CMD_BINDDESCRIPTORSETS, "vkCmdBindDescriptorSets()"); in vkCmdBindDescriptorSets()
7426 if (pCB->lastBound[pipelineBindPoint].boundDescriptorSets[i] && in vkCmdBindDescriptorSets()
7428 … dev_data, dev_data->setMap[pCB->lastBound[pipelineBindPoint].boundDescriptorSets[i]], layout, i, in vkCmdBindDescriptorSets()
7433 …(uint64_t)pCB->lastBound[pipelineBindPoint].boundDescriptorSets[i], __LINE__, DRAWSTATE_NONE, "DS", in vkCmdBindDescriptorSets()
7436 … (uint64_t)pCB->lastBound[pipelineBindPoint].boundDescriptorSets[i], i, (uint64_t)layout); in vkCmdBindDescriptorSets()
7437pCB->lastBound[pipelineBindPoint].boundDescriptorSets[i] = VK_NULL_HANDLE; in vkCmdBindDescriptorSets()
7442 … if ((pCB->lastBound[pipelineBindPoint].boundDescriptorSets.size() - 1) > (lastSetIndex)) { in vkCmdBindDescriptorSets()
7454 … (uint64_t)pCB->lastBound[pipelineBindPoint].boundDescriptorSets[lastSetIndex], lastSetIndex, in vkCmdBindDescriptorSets()
7456pCB->lastBound[pipelineBindPoint].boundDescriptorSets.resize(lastSetIndex + 1); in vkCmdBindDescriptorSets()
7470 pCB->lastBound[pipelineBindPoint].dynamicOffsets.push_back(pDynamicOffsets[i]); in vkCmdBindDescriptorSets()
7484 pCB->dynamicOffsets.emplace_back(pDynamicOffsets[i]); in vkCmdBindDescriptorSets()
7512 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdBindIndexBuffer() local
7513 if (pCB) { in vkCmdBindIndexBuffer()
7514 skipCall |= addCmd(dev_data, pCB, CMD_BINDINDEXBUFFER, "vkCmdBindIndexBuffer()"); in vkCmdBindIndexBuffer()
7533 pCB->status |= CBSTATUS_INDEX_BUFFER_BOUND; in vkCmdBindIndexBuffer()
7540 void updateResourceTracking(GLOBAL_CB_NODE *pCB, uint32_t firstBinding, uint32_t bindingCount, cons… in updateResourceTracking() argument
7542 if (pCB->currentDrawData.buffers.size() < end) { in updateResourceTracking()
7543 pCB->currentDrawData.buffers.resize(end); in updateResourceTracking()
7546 pCB->currentDrawData.buffers[i + firstBinding] = pBuffers[i]; in updateResourceTracking()
7550 void updateResourceTrackingOnDraw(GLOBAL_CB_NODE *pCB) { pCB->drawData.push_back(pCB->currentDrawDa… in updateResourceTrackingOnDraw() argument
7572 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdBindVertexBuffers() local
7573 if (pCB) { in vkCmdBindVertexBuffers()
7574 addCmd(dev_data, pCB, CMD_BINDVERTEXBUFFER, "vkCmdBindVertexBuffer()"); in vkCmdBindVertexBuffers()
7575 updateResourceTracking(pCB, firstBinding, bindingCount, pBuffers); in vkCmdBindVertexBuffers()
7637 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdDraw() local
7638 if (pCB) { in vkCmdDraw()
7639 skipCall |= addCmd(dev_data, pCB, CMD_DRAW, "vkCmdDraw()"); in vkCmdDraw()
7640 pCB->drawCount[DRAW]++; in vkCmdDraw()
7641 skipCall |= validate_draw_state(dev_data, pCB, VK_FALSE); in vkCmdDraw()
7648 updateResourceTrackingOnDraw(pCB); in vkCmdDraw()
7650 skipCall |= outsideRenderPass(dev_data, pCB, "vkCmdDraw"); in vkCmdDraw()
7667 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdDrawIndexed() local
7668 if (pCB) { in vkCmdDrawIndexed()
7669 skipCall |= addCmd(dev_data, pCB, CMD_DRAWINDEXED, "vkCmdDrawIndexed()"); in vkCmdDrawIndexed()
7670 pCB->drawCount[DRAW_INDEXED]++; in vkCmdDrawIndexed()
7671 skipCall |= validate_draw_state(dev_data, pCB, VK_TRUE); in vkCmdDrawIndexed()
7678 updateResourceTrackingOnDraw(pCB); in vkCmdDrawIndexed()
7680 skipCall |= outsideRenderPass(dev_data, pCB, "vkCmdDrawIndexed"); in vkCmdDrawIndexed()
7701 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdDrawIndirect() local
7702 if (pCB) { in vkCmdDrawIndirect()
7703 skipCall |= addCmd(dev_data, pCB, CMD_DRAWINDIRECT, "vkCmdDrawIndirect()"); in vkCmdDrawIndirect()
7704 pCB->drawCount[DRAW_INDIRECT]++; in vkCmdDrawIndirect()
7705 skipCall |= validate_draw_state(dev_data, pCB, VK_FALSE); in vkCmdDrawIndirect()
7712 updateResourceTrackingOnDraw(pCB); in vkCmdDrawIndirect()
7714 skipCall |= outsideRenderPass(dev_data, pCB, "vkCmdDrawIndirect"); in vkCmdDrawIndirect()
7734 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdDrawIndexedIndirect() local
7735 if (pCB) { in vkCmdDrawIndexedIndirect()
7736 skipCall |= addCmd(dev_data, pCB, CMD_DRAWINDEXEDINDIRECT, "vkCmdDrawIndexedIndirect()"); in vkCmdDrawIndexedIndirect()
7737 pCB->drawCount[DRAW_INDEXED_INDIRECT]++; in vkCmdDrawIndexedIndirect()
7739 skipCall |= validate_draw_state(dev_data, pCB, VK_TRUE); in vkCmdDrawIndexedIndirect()
7748 updateResourceTrackingOnDraw(pCB); in vkCmdDrawIndexedIndirect()
7750 skipCall |= outsideRenderPass(dev_data, pCB, "vkCmdDrawIndexedIndirect"); in vkCmdDrawIndexedIndirect()
7764 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdDispatch() local
7765 if (pCB) { in vkCmdDispatch()
7766 skipCall |= addCmd(dev_data, pCB, CMD_DISPATCH, "vkCmdDispatch()"); in vkCmdDispatch()
7767 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdDispatch"); in vkCmdDispatch()
7786 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdDispatchIndirect() local
7787 if (pCB) { in vkCmdDispatchIndirect()
7788 skipCall |= addCmd(dev_data, pCB, CMD_DISPATCHINDIRECT, "vkCmdDispatchIndirect()"); in vkCmdDispatchIndirect()
7789 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdDispatchIndirect"); in vkCmdDispatchIndirect()
7828 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdCopyBuffer() local
7829 if (pCB) { in vkCmdCopyBuffer()
7830 skipCall |= addCmd(dev_data, pCB, CMD_COPYBUFFER, "vkCmdCopyBuffer()"); in vkCmdCopyBuffer()
7831 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdCopyBuffer"); in vkCmdCopyBuffer()
7843 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, cmdBuffer); in VerifySourceImageLayout() local
7848 if (!FindLayout(pCB, srcImage, sub, node)) { in VerifySourceImageLayout()
7849 SetLayout(pCB, srcImage, sub, {srcImageLayout, srcImageLayout}); in VerifySourceImageLayout()
7882 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, cmdBuffer); in VerifyDestImageLayout() local
7887 if (!FindLayout(pCB, destImage, sub, node)) { in VerifyDestImageLayout()
7888 SetLayout(pCB, destImage, sub, {destImageLayout, destImageLayout}); in VerifyDestImageLayout()
7946 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdCopyImage() local
7947 if (pCB) { in vkCmdCopyImage()
7948 skipCall |= addCmd(dev_data, pCB, CMD_COPYIMAGE, "vkCmdCopyImage()"); in vkCmdCopyImage()
7949 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdCopyImage"); in vkCmdCopyImage()
7992 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdBlitImage() local
7993 if (pCB) { in vkCmdBlitImage()
7994 skipCall |= addCmd(dev_data, pCB, CMD_BLITIMAGE, "vkCmdBlitImage()"); in vkCmdBlitImage()
7995 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdBlitImage"); in vkCmdBlitImage()
8034 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdCopyBufferToImage() local
8035 if (pCB) { in vkCmdCopyBufferToImage()
8036 skipCall |= addCmd(dev_data, pCB, CMD_COPYBUFFERTOIMAGE, "vkCmdCopyBufferToImage()"); in vkCmdCopyBufferToImage()
8037 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdCopyBufferToImage"); in vkCmdCopyBufferToImage()
8080 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdCopyImageToBuffer() local
8081 if (pCB) { in vkCmdCopyImageToBuffer()
8082 skipCall |= addCmd(dev_data, pCB, CMD_COPYIMAGETOBUFFER, "vkCmdCopyImageToBuffer()"); in vkCmdCopyImageToBuffer()
8083 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdCopyImageToBuffer"); in vkCmdCopyImageToBuffer()
8116 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdUpdateBuffer() local
8117 if (pCB) { in vkCmdUpdateBuffer()
8118 skipCall |= addCmd(dev_data, pCB, CMD_UPDATEBUFFER, "vkCmdUpdateBuffer()"); in vkCmdUpdateBuffer()
8119 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdCopyUpdateBuffer"); in vkCmdUpdateBuffer()
8148 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdFillBuffer() local
8149 if (pCB) { in vkCmdFillBuffer()
8150 skipCall |= addCmd(dev_data, pCB, CMD_FILLBUFFER, "vkCmdFillBuffer()"); in vkCmdFillBuffer()
8151 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdCopyFillBuffer"); in vkCmdFillBuffer()
8164 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdClearAttachments() local
8165 if (pCB) { in vkCmdClearAttachments()
8166 skipCall |= addCmd(dev_data, pCB, CMD_CLEARATTACHMENTS, "vkCmdClearAttachments()"); in vkCmdClearAttachments()
8168 …if (!hasDrawCmd(pCB) && (pCB->activeRenderPassBeginInfo.renderArea.extent.width == pRects[0].rect.… in vkCmdClearAttachments()
8169 … (pCB->activeRenderPassBeginInfo.renderArea.extent.height == pRects[0].rect.extent.height)) { in vkCmdClearAttachments()
8181 skipCall |= outsideRenderPass(dev_data, pCB, "vkCmdClearAttachments"); in vkCmdClearAttachments()
8185 if (pCB->activeRenderPass) { in vkCmdClearAttachments()
8186 … const VkRenderPassCreateInfo *pRPCI = dev_data->renderPassMap[pCB->activeRenderPass]->pCreateInfo; in vkCmdClearAttachments()
8187 const VkSubpassDescription *pSD = &pRPCI->pSubpasses[pCB->activeSubpass]; in vkCmdClearAttachments()
8204 attachment->colorAttachment, pCB->activeSubpass); in vkCmdClearAttachments()
8218 pCB->activeSubpass); in vkCmdClearAttachments()
8248 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdClearColorImage() local
8249 if (pCB) { in vkCmdClearColorImage()
8250 skipCall |= addCmd(dev_data, pCB, CMD_CLEARCOLORIMAGE, "vkCmdClearColorImage()"); in vkCmdClearColorImage()
8251 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdClearColorImage"); in vkCmdClearColorImage()
8279 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdClearDepthStencilImage() local
8280 if (pCB) { in vkCmdClearDepthStencilImage()
8281 … skipCall |= addCmd(dev_data, pCB, CMD_CLEARDEPTHSTENCILIMAGE, "vkCmdClearDepthStencilImage()"); in vkCmdClearDepthStencilImage()
8282 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdClearDepthStencilImage"); in vkCmdClearDepthStencilImage()
8317 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdResolveImage() local
8318 if (pCB) { in vkCmdResolveImage()
8319 skipCall |= addCmd(dev_data, pCB, CMD_RESOLVEIMAGE, "vkCmdResolveImage()"); in vkCmdResolveImage()
8320 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdResolveImage"); in vkCmdResolveImage()
8330 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in setEventStageMask() local
8331 if (pCB) { in setEventStageMask()
8332 pCB->eventToStageMap[event] = stageMask; in setEventStageMask()
8346 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdSetEvent() local
8347 if (pCB) { in vkCmdSetEvent()
8348 skipCall |= addCmd(dev_data, pCB, CMD_SETEVENT, "vkCmdSetEvent()"); in vkCmdSetEvent()
8349 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdSetEvent"); in vkCmdSetEvent()
8350 pCB->events.push_back(event); in vkCmdSetEvent()
8353 pCB->eventUpdates.push_back(eventUpdate); in vkCmdSetEvent()
8365 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdResetEvent() local
8366 if (pCB) { in vkCmdResetEvent()
8367 skipCall |= addCmd(dev_data, pCB, CMD_RESETEVENT, "vkCmdResetEvent()"); in vkCmdResetEvent()
8368 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdResetEvent"); in vkCmdResetEvent()
8369 pCB->events.push_back(event); in vkCmdResetEvent()
8372 pCB->eventUpdates.push_back(eventUpdate); in vkCmdResetEvent()
8381 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, cmdBuffer); in TransitionImageLayouts() local
8400 if (!FindLayout(pCB, mem_barrier->image, sub, node)) { in TransitionImageLayouts()
8401 … SetLayout(pCB, mem_barrier->image, sub, {mem_barrier->oldLayout, mem_barrier->newLayout}); in TransitionImageLayouts()
8412 SetLayout(pCB, mem_barrier->image, sub, mem_barrier->newLayout); in TransitionImageLayouts()
8538 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, cmdBuffer); in ValidateBarriers() local
8539 if (pCB->activeRenderPass && memBarrierCount) { in ValidateBarriers()
8540 … if (!dev_data->renderPassMap[pCB->activeRenderPass]->hasSelfDependency[pCB->activeSubpass]) { in ValidateBarriers()
8544 funcName, pCB->activeSubpass); in ValidateBarriers()
8661 if (pCB->activeRenderPass) { in ValidateBarriers()
8749 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdWaitEvents() local
8750 if (pCB) { in vkCmdWaitEvents()
8752 pCB->waitedEvents.push_back(pEvents[i]); in vkCmdWaitEvents()
8753 pCB->events.push_back(pEvents[i]); in vkCmdWaitEvents()
8757 pCB->eventUpdates.push_back(eventUpdate); in vkCmdWaitEvents()
8758 if (pCB->state == CB_RECORDING) { in vkCmdWaitEvents()
8759 skipCall |= addCmd(dev_data, pCB, CMD_WAITEVENTS, "vkCmdWaitEvents()"); in vkCmdWaitEvents()
8783 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdPipelineBarrier() local
8784 if (pCB) { in vkCmdPipelineBarrier()
8785 skipCall |= addCmd(dev_data, pCB, CMD_PIPELINEBARRIER, "vkCmdPipelineBarrier()"); in vkCmdPipelineBarrier()
8803 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdBeginQuery() local
8804 if (pCB) { in vkCmdBeginQuery()
8806 pCB->activeQueries.insert(query); in vkCmdBeginQuery()
8807 if (!pCB->startedQueries.count(query)) { in vkCmdBeginQuery()
8808 pCB->startedQueries.insert(query); in vkCmdBeginQuery()
8810 skipCall |= addCmd(dev_data, pCB, CMD_BEGINQUERY, "vkCmdBeginQuery()"); in vkCmdBeginQuery()
8821 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdEndQuery() local
8822 if (pCB) { in vkCmdEndQuery()
8824 if (!pCB->activeQueries.count(query)) { in vkCmdEndQuery()
8830 pCB->activeQueries.erase(query); in vkCmdEndQuery()
8832 pCB->queryToStateMap[query] = 1; in vkCmdEndQuery()
8833 if (pCB->state == CB_RECORDING) { in vkCmdEndQuery()
8834 skipCall |= addCmd(dev_data, pCB, CMD_ENDQUERY, "VkCmdEndQuery()"); in vkCmdEndQuery()
8849 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdResetQueryPool() local
8850 if (pCB) { in vkCmdResetQueryPool()
8853 pCB->waitedEventsBeforeQueryReset[query] = pCB->waitedEvents; in vkCmdResetQueryPool()
8854 pCB->queryToStateMap[query] = 0; in vkCmdResetQueryPool()
8856 if (pCB->state == CB_RECORDING) { in vkCmdResetQueryPool()
8857 skipCall |= addCmd(dev_data, pCB, CMD_RESETQUERYPOOL, "VkCmdResetQueryPool()"); in vkCmdResetQueryPool()
8861 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdQueryPool"); in vkCmdResetQueryPool()
8874 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdCopyQueryPoolResults() local
8892 if (pCB) { in vkCmdCopyQueryPoolResults()
8895 if (!pCB->queryToStateMap[query]) { in vkCmdCopyQueryPoolResults()
8902 if (pCB->state == CB_RECORDING) { in vkCmdCopyQueryPoolResults()
8903 … skipCall |= addCmd(dev_data, pCB, CMD_COPYQUERYPOOLRESULTS, "vkCmdCopyQueryPoolResults()"); in vkCmdCopyQueryPoolResults()
8907 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdCopyQueryPoolResults"); in vkCmdCopyQueryPoolResults()
8921 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdPushConstants() local
8922 if (pCB) { in vkCmdPushConstants()
8923 if (pCB->state == CB_RECORDING) { in vkCmdPushConstants()
8924 skipCall |= addCmd(dev_data, pCB, CMD_PUSHCONSTANTS, "vkCmdPushConstants()"); in vkCmdPushConstants()
8943 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdWriteTimestamp() local
8944 if (pCB) { in vkCmdWriteTimestamp()
8946 pCB->queryToStateMap[query] = 1; in vkCmdWriteTimestamp()
8947 if (pCB->state == CB_RECORDING) { in vkCmdWriteTimestamp()
8948 skipCall |= addCmd(dev_data, pCB, CMD_WRITETIMESTAMP, "vkCmdWriteTimestamp()"); in vkCmdWriteTimestamp()
9465 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, cmdBuffer); in VerifyFramebufferAndRenderPassLayouts() local
9488 if (!FindLayout(pCB, image, sub, node)) { in VerifyFramebufferAndRenderPassLayouts()
9489 SetLayout(pCB, image, sub, newNode); in VerifyFramebufferAndRenderPassLayouts()
9508 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, cmdBuffer); in TransitionSubpassLayouts() local
9522 SetLayout(dev_data, pCB, image_view, subpass.pInputAttachments[j].layout); in TransitionSubpassLayouts()
9526 SetLayout(dev_data, pCB, image_view, subpass.pColorAttachments[j].layout); in TransitionSubpassLayouts()
9530 SetLayout(dev_data, pCB, image_view, subpass.pDepthStencilAttachment->layout); in TransitionSubpassLayouts()
9534 VkBool32 validatePrimaryCommandBuffer(const layer_data *my_data, const GLOBAL_CB_NODE *pCB, const s… in validatePrimaryCommandBuffer() argument
9536 if (pCB->createInfo.level != VK_COMMAND_BUFFER_LEVEL_PRIMARY) { in validatePrimaryCommandBuffer()
9546 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, cmdBuffer); in TransitionFinalSubpassLayouts() local
9559 SetLayout(dev_data, pCB, image_view, pRenderPassInfo->pAttachments[i].finalLayout); in TransitionFinalSubpassLayouts()
9568 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdBeginRenderPass() local
9569 if (pCB) { in vkCmdBeginRenderPass()
9628 skipCall |= insideRenderPass(dev_data, pCB, "vkCmdBeginRenderPass"); in vkCmdBeginRenderPass()
9629 skipCall |= validatePrimaryCommandBuffer(dev_data, pCB, "vkCmdBeginRenderPass"); in vkCmdBeginRenderPass()
9630 skipCall |= addCmd(dev_data, pCB, CMD_BEGINRENDERPASS, "vkCmdBeginRenderPass()"); in vkCmdBeginRenderPass()
9631 pCB->activeRenderPass = pRenderPassBegin->renderPass; in vkCmdBeginRenderPass()
9633 pCB->activeRenderPassBeginInfo = *pRenderPassBegin; in vkCmdBeginRenderPass()
9634 pCB->activeSubpass = 0; in vkCmdBeginRenderPass()
9635 pCB->activeSubpassContents = contents; in vkCmdBeginRenderPass()
9636 pCB->framebuffer = pRenderPassBegin->framebuffer; in vkCmdBeginRenderPass()
9638 … dev_data->frameBufferMap[pCB->framebuffer].referencingCmdBuffers.insert(pCB->commandBuffer); in vkCmdBeginRenderPass()
9660 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdNextSubpass() local
9662 if (pCB) { in vkCmdNextSubpass()
9663 skipCall |= validatePrimaryCommandBuffer(dev_data, pCB, "vkCmdNextSubpass"); in vkCmdNextSubpass()
9664 skipCall |= addCmd(dev_data, pCB, CMD_NEXTSUBPASS, "vkCmdNextSubpass()"); in vkCmdNextSubpass()
9665 pCB->activeSubpass++; in vkCmdNextSubpass()
9666 pCB->activeSubpassContents = contents; in vkCmdNextSubpass()
9667 … TransitionSubpassLayouts(commandBuffer, &pCB->activeRenderPassBeginInfo, pCB->activeSubpass); in vkCmdNextSubpass()
9668 if (pCB->lastBound[VK_PIPELINE_BIND_POINT_GRAPHICS].pipeline) { in vkCmdNextSubpass()
9669 skipCall |= validatePipelineState(dev_data, pCB, VK_PIPELINE_BIND_POINT_GRAPHICS, in vkCmdNextSubpass()
9670pCB->lastBound[VK_PIPELINE_BIND_POINT_GRAPHICS].pipeline); in vkCmdNextSubpass()
9672 skipCall |= outsideRenderPass(dev_data, pCB, "vkCmdNextSubpass"); in vkCmdNextSubpass()
9712 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdEndRenderPass() local
9714 if (pCB) { in vkCmdEndRenderPass()
9715 skipCall |= outsideRenderPass(dev_data, pCB, "vkCmdEndRenderpass"); in vkCmdEndRenderPass()
9716 skipCall |= validatePrimaryCommandBuffer(dev_data, pCB, "vkCmdEndRenderPass"); in vkCmdEndRenderPass()
9717 skipCall |= addCmd(dev_data, pCB, CMD_ENDRENDERPASS, "vkCmdEndRenderPass()"); in vkCmdEndRenderPass()
9718 TransitionFinalSubpassLayouts(commandBuffer, &pCB->activeRenderPassBeginInfo); in vkCmdEndRenderPass()
9719 pCB->activeRenderPass = 0; in vkCmdEndRenderPass()
9720 pCB->activeSubpass = 0; in vkCmdEndRenderPass()
9875 …validateFramebuffer(layer_data *dev_data, VkCommandBuffer primaryBuffer, const GLOBAL_CB_NODE *pCB, in validateFramebuffer() argument
9881 VkFramebuffer primary_fb = pCB->framebuffer; in validateFramebuffer()
9906 bool validateSecondaryCommandBufferState(layer_data *dev_data, GLOBAL_CB_NODE *pCB, GLOBAL_CB_NODE … in validateSecondaryCommandBufferState() argument
9909 for (auto queryObject : pCB->activeQueries) { in validateSecondaryCommandBufferState()
9922 …reinterpret_cast<void *>(pCB->commandBuffer), reinterpret_cast<const uint64_t &>(queryPoolData->fi… in validateSecondaryCommandBufferState()
9937 …reinterpret_cast<void *>(pCB->commandBuffer), reinterpret_cast<const uint64_t &>(queryPoolData->fi… in validateSecondaryCommandBufferState()
9949 GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer); in vkCmdExecuteCommands() local
9950 if (pCB) { in vkCmdExecuteCommands()
9966 … } else if (pCB->activeRenderPass) { // Secondary CB w/i RenderPass must have *CONTINUE_BIT set in vkCmdExecuteCommands()
9973 (void *)pCommandBuffers[i], (uint64_t)pCB->activeRenderPass); in vkCmdExecuteCommands()
9976 …skipCall |= validateRenderPassCompatibility(dev_data, commandBuffer, pCB->activeRenderPass, pComma… in vkCmdExecuteCommands()
9978 … skipCall |= validateFramebuffer(dev_data, commandBuffer, pCB, pCommandBuffers[i], pSubCB); in vkCmdExecuteCommands()
9981 if (!verify_renderpass_compatibility(dev_data, pCB->activeRenderPass, in vkCmdExecuteCommands()
9989 (uint64_t)pCB->activeRenderPass, errorString.c_str()); in vkCmdExecuteCommands()
9994 …if (pSubCB->beginInfo.pInheritanceInfo->framebuffer != pCB->activeRenderPassBeginInfo.framebuffer)… in vkCmdExecuteCommands()
10001 … (uint64_t)pCB->activeRenderPassBeginInfo.framebuffer, (uint64_t)pCB->activeRenderPass); in vkCmdExecuteCommands()
10006 skipCall |= validateSecondaryCommandBufferState(dev_data, pCB, pSubCB); in vkCmdExecuteCommands()
10014 … (uint64_t)(pCB->commandBuffer), __LINE__, DRAWSTATE_INVALID_CB_SIMULTANEOUS_USE, "DS", in vkCmdExecuteCommands()
10017 (uint64_t)(pCB->commandBuffer)); in vkCmdExecuteCommands()
10019 if (pCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT) { in vkCmdExecuteCommands()
10028 (uint64_t)(pCommandBuffers[i]), (uint64_t)(pCB->commandBuffer)); in vkCmdExecuteCommands()
10029 pCB->beginInfo.flags &= ~VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT; in vkCmdExecuteCommands()
10032 … if (!pCB->activeQueries.empty() && !dev_data->physDevProperties.features.inheritedQueries) { in vkCmdExecuteCommands()
10042 pSubCB->primaryCommandBuffer = pCB->commandBuffer; in vkCmdExecuteCommands()
10043 pCB->secondaryCommandBuffers.insert(pSubCB->commandBuffer); in vkCmdExecuteCommands()
10046 skipCall |= validatePrimaryCommandBuffer(dev_data, pCB, "vkCmdExecuteComands"); in vkCmdExecuteCommands()
10047 skipCall |= addCmd(dev_data, pCB, CMD_EXECUTECOMMANDS, "vkCmdExecuteComands()"); in vkCmdExecuteCommands()