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

Function GetAccessProperties

layers/sync/sync_reporting.cpp:122–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122static 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
144static void GetPriorUsageProperties(const ResourceUsageInfo& prior_usage_info, ReportProperties& properties) {
145 properties.Add(kPropertyPriorCommand, vvl::String(prior_usage_info.command));

Callers 1

Calls 7

FormatAccessPropertyFunction · 0.85
IsHazardVsReadFunction · 0.85
FormatSyncAccessesFunction · 0.85
StateMethod · 0.80
GetReadBarriersMethod · 0.80
GetWriteBarriersMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected