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

#include <utility>

namespace low_latency {

DeviceContext::DeviceContext(InstanceContext& parent_instance,
                             const VkDevice& device,
                             const PFN_vkSetDeviceLoaderData& sdld,
                             VkuDeviceDispatchTable&& vtable)
    : instance(parent_instance), device(device), sdld(sdld),
      vtable(std::move(vtable)) {}

DeviceContext::~DeviceContext() {
    // We will let the destructor handle clearing here, but they should be
    // unique by now (ie, removed from the layer's context map).
    for (const auto& [queue, queue_context] : this->queues) {
        assert(queue_context.unique());
    }
}

} // namespace low_latency