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

Function FormatSyncAccesses

layers/sync/sync_reporting.cpp:612–640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

610}
611
612std::string FormatSyncAccesses(const SyncAccessFlags& sync_accesses, const SyncValidator& device, VkQueueFlags allowed_queue_flags,
613 bool format_as_extra_property) {
614 const auto report_accesses = ConvertSyncAccessesToCompactVkForm(sync_accesses, device, allowed_queue_flags);
615 if (report_accesses.empty()) {
616 return "0";
617 }
618 std::ostringstream out;
619 bool first = true;
620 for (const auto& [stages, accesses] : report_accesses) {
621 if (!first) {
622 out << (format_as_extra_property ? ":" : ", ");
623 }
624 if (format_as_extra_property) {
625 if (accesses == kAllAccesses) {
626 out << string_VkPipelineStageFlags2(stages) << "(ALL_ACCESSES)";
627 } else {
628 out << string_VkPipelineStageFlags2(stages) << "(" << string_VkAccessFlags2(accesses) << ")";
629 }
630 } else {
631 if (accesses == kAllAccesses) {
632 out << "all accesses at " << string_VkPipelineStageFlags2(stages);
633 } else {
634 out << string_VkAccessFlags2(accesses) << " accesses at " << string_VkPipelineStageFlags2(stages);
635 }
636 }
637 first = false;
638 }
639 return out.str();
640}
641
642void FormatVideoPictureResouce(const Logger& logger, const VkVideoPictureResourceInfoKHR& video_picture, std::ostringstream& ss) {
643 ss << "{";

Callers 2

GetAccessPropertiesFunction · 0.85
FormatErrorMessageFunction · 0.85

Calls 2

emptyMethod · 0.45

Tested by

no test coverage detected