MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / DoQueuePresentValidate

Method DoQueuePresentValidate

layers/sync/sync_submit.cpp:560–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558}
559
560bool 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
589void QueueBatchContext::DoPresentOperations(const PresentedImages& presented_images) {
590 // For present, tagging is internal to the presented image record.

Callers 1

ProcessQueuePresentMethod · 0.80

Calls 10

HandleClass · 0.85
IsHazardMethod · 0.80
PresentErrorMethod · 0.80
SyncErrorMethod · 0.80
HazardMethod · 0.80
DetectHazardMethod · 0.45
lockMethod · 0.45
HandleMethod · 0.45
GetQueueMethod · 0.45
FormatHandleMethod · 0.45

Tested by

no test coverage detected