Files
Seele/src/Engine/Graphics/Vulkan/Queue.h
T
2023-11-15 17:42:57 +01:00

38 lines
878 B
C++

#pragma once
#include "Resources.h"
namespace Seele
{
namespace Vulkan
{
DECLARE_REF(Command)
DECLARE_REF(Graphics)
class Queue
{
public:
Queue(PGraphics graphics, Gfx::QueueType queueType, uint32 familyIndex, uint32 queueIndex);
virtual ~Queue();
void submitCommandBuffer(PCommand command, uint32 numSignalSemaphores = 0, VkSemaphore *signalSemaphore = nullptr);
void submitCommandBuffer(PCommand command, VkSemaphore signalSemaphore)
{
submitCommandBuffer(command, 1, &signalSemaphore);
}
constexpr uint32 getFamilyIndex() const
{
return familyIndex;
}
constexpr VkQueue getHandle() const
{
return queue;
}
private:
std::mutex queueLock;
PGraphics graphics;
VkQueue queue;
uint32 familyIndex;
Gfx::QueueType queueType;
};
DEFINE_REF(Queue)
} // namespace Vulkan
} // namespace Seele