2020-03-24 21:05:32 +01:00
|
|
|
#pragma once
|
2023-10-26 18:37:29 +02:00
|
|
|
#include "Resources.h"
|
2020-03-24 21:05:32 +01:00
|
|
|
|
|
|
|
|
namespace Seele
|
|
|
|
|
{
|
2020-04-12 15:47:19 +02:00
|
|
|
namespace Vulkan
|
|
|
|
|
{
|
2023-11-15 00:06:00 +01:00
|
|
|
DECLARE_REF(Command)
|
2021-04-01 16:40:14 +02:00
|
|
|
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
|