| 558 | } |
| 559 | |
| 560 | bool QueueBatchContext::DoQueuePresentValidate(const Location& loc, const PresentedImages& presented_images) { |
| 561 | bool skip = false; |
| 562 | // Tag the presented images so record doesn't have to know the tagging scheme |
| 563 | for (const PresentedImage& presented : presented_images) { |
| 564 | ImageRangeGen range_gen = presented.range_gen; |
| 565 | HazardResult hazard = access_context_.DetectHazard(range_gen, SYNC_PRESENT_ENGINE_SYNCVAL_PRESENT_PRESENTED_SYNCVAL); |
| 566 | if (hazard.IsHazard()) { |
| 567 | const VulkanTypedHandle swapchain_handle = vvl::StateObject::Handle(presented.swapchain_state.lock()); |
| 568 | const VulkanTypedHandle image_handle = vvl::StateObject::Handle(presented.image); |
| 569 | |
| 570 | LogObjectList objlist(queue_state_->GetQueue()->Handle(), swapchain_handle, image_handle); |
| 571 | |
| 572 | std::ostringstream ss; |
| 573 | ss << "swapchain image " << presented.image_index << " ("; |
| 574 | ss << sync_state_.FormatHandle(image_handle); |
| 575 | ss << " from " << sync_state_.FormatHandle(swapchain_handle) << ")"; |
| 576 | const std::string resource_description = ss.str(); |
| 577 | |
| 578 | const std::string error = sync_state_.error_messages_.PresentError(hazard, *this, vvl::Func::vkQueuePresentKHR, |
| 579 | resource_description, presented.present_index); |
| 580 | skip |= sync_state_.SyncError(hazard.Hazard(), objlist, loc, error); |
| 581 | if (skip) { |
| 582 | break; |
| 583 | } |
| 584 | } |
| 585 | } |
| 586 | return skip; |
| 587 | } |
| 588 | |
| 589 | void QueueBatchContext::DoPresentOperations(const PresentedImages& presented_images) { |
| 590 | // For present, tagging is internal to the presented image record. |
no test coverage detected