16 throw std::runtime_error(
"TimelineSynchronizer requires a valid ApplicationContext");
19 VkSemaphoreTypeCreateInfo typeInfo{
20 .sType = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO,
22 .semaphoreType = VK_SEMAPHORE_TYPE_TIMELINE,
26 VkSemaphoreCreateInfo createInfo{
27 .sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO,
33 if (result != VK_SUCCESS)
35 throw std::runtime_error(
"Failed to create timeline semaphore");
90 VkSemaphoreWaitInfo waitInfo{
91 .sType = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO,
99 VkResult result = vkWaitSemaphores(
context_->getVkDevice(), &waitInfo, timeout);
100 if (result != VK_SUCCESS && result != VK_TIMEOUT)
102 throw std::runtime_error(
"Failed to wait on timeline semaphore");
The application context is the core class which stores the basic openxr and vulkan objects.