diff options
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 |
