aboutsummaryrefslogtreecommitdiff
path: root/src/device_context.hh
blob: a936d6d75d07c5541bee406ff12ab00f6eef025d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef DEVICE_CONTEXT_HH_
#define DEVICE_CONTEXT_HH_

#include <memory>
#include <unordered_map>

#include <vulkan/utility/vk_dispatch_table.h>
#include <vulkan/vulkan.hpp>

#include "instance_context.hh"

namespace low_latency {

class QueueContext;

struct DeviceContext {
    InstanceContext& instance;

    const VkDevice device;
    const VkuDeviceDispatchTable vtable;

    std::unordered_map<VkQueue, std::unique_ptr<QueueContext>> queue_contexts;

  public:
    DeviceContext(InstanceContext& parent_instance, const VkDevice& device,
                  VkuDeviceDispatchTable&& vtable);
    DeviceContext(const DeviceContext&) = delete;
    DeviceContext(DeviceContext&&) = delete;
    DeviceContext operator==(const DeviceContext&) = delete;
    DeviceContext operator==(DeviceContext&&) = delete;
};

}; // namespace low_latency

#endif