iwa/source/semaphore.cpp
2024-04-06 14:11:26 +02:00

20 lines
429 B
C++

#include "iwa/semaphore.hpp"
#include "iwa/device.hpp"
namespace iwa
{
Semaphore::Semaphore(ObjectPtr<Device> owner, const SemaphoreCreationArgs& args) : super_t(std::move(owner))
{
mHandle = getOwner()->getVkHandle().createSemaphore(vk::SemaphoreCreateInfo{
.flags = args.flags
});
}
Semaphore::~Semaphore() noexcept
{
IWA_DELETE_DEVICE_OBJECT(getOwner(), mHandle, destroySemaphore)
}
} // namespace iwa