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

Method ApplyBarrier

layers/sync/sync_op.cpp:1337–1349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1335}
1336
1337void SyncEventsContext::ApplyBarrier(const SyncExecScope& src, const SyncExecScope& dst, ResourceUsageTag tag) {
1338 const bool all_commands_bit = 0 != (src.stage_mask & VK_PIPELINE_STAGE_ALL_COMMANDS_BIT);
1339 for (auto& event_pair : map_) {
1340 assert(event_pair.second); // Shouldn't be storing empty
1341 auto& sync_event = *event_pair.second;
1342 // Events don't happen at a stage, so we need to check and store the unexpanded ALL_COMMANDS if set for inter-event-calls
1343 // But only if occuring before the tag
1344 if (((sync_event.barriers & src.exec_scope) || all_commands_bit) && (sync_event.last_command_tag <= tag)) {
1345 sync_event.barriers |= dst.exec_scope;
1346 sync_event.barriers |= dst.stage_mask & VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
1347 }
1348 }
1349}
1350
1351void SyncEventsContext::ApplyTaggedWait(VkQueueFlags queue_flags, ResourceUsageTag tag) {
1352 const SyncExecScope src_scope =

Callers 6

operator()Method · 0.45
ApplyGlobalBarriersMethod · 0.45
ReplayRecordMethod · 0.45
operator()Method · 0.45
operator()Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected