]> git.tdb.fi Git - libs/gl.git/blob - source/backends/vulkan/semaphore.cpp
Initial implementation of Vulkan backend
[libs/gl.git] / source / backends / vulkan / semaphore.cpp
1 #include "device.h"
2 #include "semaphore.h"
3 #include "vulkan.h"
4
5 namespace Msp {
6 namespace GL {
7
8 Semaphore::Semaphore():
9         device(Device::get_current())
10 {
11         const VulkanFunctions &vk = device.get_functions();
12
13         VkSemaphoreCreateInfo semaphore_info = { };
14         semaphore_info.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO;
15
16         vk.CreateSemaphore(semaphore_info, handle);
17 }
18
19 Semaphore::~Semaphore()
20 {
21         device.get_destroy_queue().destroy(handle);
22 }
23
24 } // namespace GL
25 } // namespace Msp