aboutsummaryrefslogtreecommitdiff
path: root/src/queue_context.hh
blob: eb3f2eadd8b35aec05c38ec5d8a72cf77770a984 (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
36
37
38
39
40
41
42
43
44
#ifndef QUEUE_STATE_HH_
#define QUEUE_STATE_HH_

#include "timestamp_pool.hh"

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

#include <deque>
#include <vector>

namespace low_latency {

class QueueContext final {
  public:
    VkDevice device;
    VkuDeviceDispatchTable vtable;

    VkQueue queue;
    std::uint32_t queue_family_index;

    VkSemaphore semaphore;
    VkCommandPool command_pool;

    TimestampPool timestamp_pool;

    std::deque<
        std::vector<std::pair<TimestampPool::Handle, TimestampPool::Handle>>>
        tracked_queues;

  public:
    QueueContext(const VkDevice& device, const VkQueue queue,
               const std::uint32_t& queue_family_index,
               const VkuDeviceDispatchTable& vtable);
    QueueContext(const QueueContext&) = delete;
    QueueContext(QueueContext&&) = delete;
    QueueContext operator==(const QueueContext&) = delete;
    QueueContext operator==(QueueContext&&) = delete;
    ~QueueContext();
};

}; // namespace low_latency

#endif