| 120 | } |
| 121 | |
| 122 | static void GetAccessProperties(const HazardResult& hazard_result, const SyncValidator& device, VkQueueFlags allowed_queue_flags, |
| 123 | ReportProperties& properties) { |
| 124 | const HazardResult::HazardState& hazard = hazard_result.State(); |
| 125 | const SyncAccessInfo& access_info = GetAccessInfo(hazard.access_index); |
| 126 | const SyncAccessInfo& prior_access_info = GetAccessInfo(hazard.prior_access_index); |
| 127 | |
| 128 | if (!hazard.recorded_access.get()) { |
| 129 | properties.Add(kPropertyAccess, FormatAccessProperty(access_info)); |
| 130 | } |
| 131 | properties.Add(kPropertyPriorAccess, FormatAccessProperty(prior_access_info)); |
| 132 | |
| 133 | if (IsHazardVsRead(hazard.hazard)) { |
| 134 | const VkPipelineStageFlags2 barriers = hazard.access_state->GetReadBarriers(hazard.prior_access_index); |
| 135 | const std::string barriers_str = string_VkPipelineStageFlags2(barriers); |
| 136 | properties.Add(kPropertyReadBarriers, barriers ? barriers_str : "0"); |
| 137 | } else { |
| 138 | const SyncAccessFlags barriers = hazard.access_state->GetWriteBarriers(); |
| 139 | const std::string property_barriers_str = FormatSyncAccesses(barriers, device, allowed_queue_flags, true); |
| 140 | properties.Add(kPropertyWriteBarriers, property_barriers_str); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | static void GetPriorUsageProperties(const ResourceUsageInfo& prior_usage_info, ReportProperties& properties) { |
| 145 | properties.Add(kPropertyPriorCommand, vvl::String(prior_usage_info.command)); |
no test coverage detected