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

Method InitFrom

layers/sync/sync_access_context.cpp:31–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29VkDeviceSize ResourceBaseAddress(const vvl::Buffer& buffer) { return buffer.GetFakeBaseAddress(); }
30
31void AccessContext::InitFrom(uint32_t subpass, VkQueueFlags queue_flags,
32 const std::vector<SubpassDependencyInfo>& subpass_dependency_infos, const AccessContext* contexts,
33 const AccessContext& external_context) {
34 const SubpassDependencyInfo& info = subpass_dependency_infos[subpass];
35 async_.reserve(info.async.size());
36 for (const uint32_t async_subpass : info.async) {
37 // Start tags are not known at creation time (as it's done at BeginRenderpass)
38 async_.emplace_back(contexts[async_subpass], kInvalidTag, kQueueIdInvalid);
39 }
40
41 // Initialize barriers for the preceding subpasses and the external src barrier.
42 // To resolve contexts, we usually need regular subpass contexts and the external
43 // src context, so the corresponding barriers are stored together.
44 subpass_barriers_.resize(subpass + 1);
45 for (const auto& [src_subpass, subpass_dependencies] : info.dependencies) {
46 subpass_barriers_[src_subpass] = SubpassBarrier(contexts[src_subpass], queue_flags, subpass_dependencies);
47 }
48 subpass_barriers_[subpass] = SubpassBarrier(external_context, queue_flags, info.barrier_from_external);
49
50 // External dst barrier
51 dst_external_ = SubpassBarrier(*this, queue_flags, info.barrier_to_external);
52}
53
54ApplySingleBufferBarrierFunctor::ApplySingleBufferBarrierFunctor(const AccessContext& access_context,
55 const BarrierScope& barrier_scope, const SyncBarrier& barrier)

Callers 6

InitSubpassContextsFunction · 0.80
ValidateNextSubpassMethod · 0.80
SyncOpSetEventMethod · 0.80
ReplayRecordMethod · 0.80
ValidateMethod · 0.80

Calls 7

SubpassBarrierClass · 0.85
emplace_backMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45
AssignMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected