-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathQueue.h
50 lines (43 loc) · 1.23 KB
/
Queue.h
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
45
46
47
48
49
50
// Author : Jihong Shin (snowapril)
#if !defined(VULKAN_FRAMEWORK_QUEUE_H)
#define VULKAN_FRAMEWORK_QUEUE_H
#include <VulkanFramework/pch.h>
#include <VulkanFramework/Commands/CommandBuffer.h>
namespace vfs
{
class Queue : NonCopyable
{
public:
explicit Queue() = default;
explicit Queue(DevicePtr device,
uint32_t familyIndex);
~Queue();
public:
bool initialize (DevicePtr device, uint32_t familyIndex);
void destroyQueue (void);
void submitCmdBuffer (const std::vector<CommandBuffer>& cmdBuffers,
const Fence* fence);
void submitCmdBufferSynchronized (const std::vector<CommandBuffer>& cmdBuffers,
const std::vector<VkSemaphore>& waitSemaphores,
const std::vector<VkPipelineStageFlags>& waitDstStageMasks,
const std::vector<VkSemaphore>& signalSemaphores,
const Fence* fence);
inline VkQueue getQueueHandle(void) const
{
return _queueHandle;
}
inline uint32_t getFamilyIndex(void) const
{
return _familyIndex;
}
inline DevicePtr getDevicePtr(void) const
{
return _device;
}
private:
DevicePtr _device { nullptr };
VkQueue _queueHandle { VK_NULL_HANDLE };
uint32_t _familyIndex { 0 };
};
}
#endif