aboutsummaryrefslogtreecommitdiff
path: root/src/instance_context.cc
blob: 8aeb46c6d38ed2fe6b4a3f77f4343f13d1ca50bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "instance_context.hh"

#include <cassert>
#include <utility>

namespace low_latency {

InstanceContext::InstanceContext(const LayerContext& parent_context,
                                 const VkInstance& instance,
                                 VkuInstanceDispatchTable&& vtable)
    : layer(parent_context), instance(instance), vtable(std::move(vtable)) {}

InstanceContext::~InstanceContext() {
    // Similar to devices, we should own the only shared ptr at this point so
    // they destruct now.
    for (const auto& [device, device_context] : this->physical_devices) {
        assert(device_context.unique());
    }
}

} // namespace low_latency