diff options
| author | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2026-02-11 23:19:15 +1100 |
|---|---|---|
| committer | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2026-02-11 23:19:15 +1100 |
| commit | 76f3ef1d7c2b4393a8e8b402deb924e606448d27 (patch) | |
| tree | a291bec0544f007536a41ec1f590338aee1163e9 /src/device_context.hh | |
| parent | 77e2be172718878b38999efc247ce7571435fcc8 (diff) | |
More cleanup, fix lifetime and mutex issues
Diffstat (limited to 'src/device_context.hh')
| -rw-r--r-- | src/device_context.hh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/device_context.hh b/src/device_context.hh index a936d6d..3406da1 100644 --- a/src/device_context.hh +++ b/src/device_context.hh @@ -5,29 +5,32 @@ #include <unordered_map> #include <vulkan/utility/vk_dispatch_table.h> +#include <vulkan/vk_layer.h> #include <vulkan/vulkan.hpp> +#include "context.hh" #include "instance_context.hh" namespace low_latency { class QueueContext; -struct DeviceContext { +struct DeviceContext final : public Context { InstanceContext& instance; const VkDevice device; const VkuDeviceDispatchTable vtable; - std::unordered_map<VkQueue, std::unique_ptr<QueueContext>> queue_contexts; + // Do we need to use this unless we wrap dispatchable objects? + const PFN_vkSetDeviceLoaderData sdld; + + std::unordered_map<VkQueue, std::shared_ptr<QueueContext>> queues; public: DeviceContext(InstanceContext& parent_instance, const VkDevice& device, + const PFN_vkSetDeviceLoaderData& sdld, VkuDeviceDispatchTable&& vtable); - DeviceContext(const DeviceContext&) = delete; - DeviceContext(DeviceContext&&) = delete; - DeviceContext operator==(const DeviceContext&) = delete; - DeviceContext operator==(DeviceContext&&) = delete; + virtual ~DeviceContext(); }; }; // namespace low_latency |
