Files
Seele/src/Engine/Graphics/Vulkan/VulkanQueue.h
T

38 lines
898 B
C++
Raw Normal View History

2020-03-24 21:05:32 +01:00
#pragma once
#include "VulkanGraphicsResources.h"
namespace Seele
{
2020-04-12 15:47:19 +02:00
namespace Vulkan
{
2021-04-01 16:40:14 +02:00
DECLARE_REF(CmdBuffer)
DECLARE_REF(Graphics)
2020-04-12 15:47:19 +02:00
class Queue
{
public:
Queue(PGraphics graphics, Gfx::QueueType queueType, uint32 familyIndex, uint32 queueIndex);
virtual ~Queue();
void submitCommandBuffer(PCmdBuffer cmdBuffer, uint32 numSignalSemaphores = 0, VkSemaphore *signalSemaphore = nullptr);
inline void submitCommandBuffer(PCmdBuffer cmdBuffer, VkSemaphore signalSemaphore)
2020-03-24 21:05:32 +01:00
{
2020-04-12 15:47:19 +02:00
submitCommandBuffer(cmdBuffer, 1, &signalSemaphore);
2020-03-24 21:05:32 +01:00
}
2020-04-12 15:47:19 +02:00
uint32 getFamilyIndex() const
{
return familyIndex;
}
inline VkQueue getHandle() const
{
return queue;
}
private:
2021-04-13 23:09:16 +02:00
std::mutex queueLock;
2020-04-12 15:47:19 +02:00
PGraphics graphics;
VkQueue queue;
uint32 familyIndex;
Gfx::QueueType queueType;
};
DEFINE_REF(Queue)
} // namespace Vulkan
} // namespace Seele