aboutsummaryrefslogtreecommitdiff
path: root/src/device_context.cc
diff options
context:
space:
mode:
authorNicolas James <Eele1Ephe7uZahRie@tutanota.com>2026-02-11 23:19:15 +1100
committerNicolas James <Eele1Ephe7uZahRie@tutanota.com>2026-02-11 23:19:15 +1100
commit76f3ef1d7c2b4393a8e8b402deb924e606448d27 (patch)
treea291bec0544f007536a41ec1f590338aee1163e9 /src/device_context.cc
parent77e2be172718878b38999efc247ce7571435fcc8 (diff)
More cleanup, fix lifetime and mutex issues
Diffstat (limited to 'src/device_context.cc')
-rw-r--r--src/device_context.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/device_context.cc b/src/device_context.cc
index 4be1872..5f5c1f7 100644
--- a/src/device_context.cc
+++ b/src/device_context.cc
@@ -7,9 +7,17 @@ namespace low_latency {
DeviceContext::DeviceContext(InstanceContext& parent_instance,
const VkDevice& device,
+ const PFN_vkSetDeviceLoaderData& sdld,
VkuDeviceDispatchTable&& vtable)
- : instance(parent_instance), device(device), vtable(std::move(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 \ No newline at end of file