mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[vulkan] Add helper method to wait for presenter fence
This commit is contained in:
parent
2231caaa9e
commit
a6d1fe07f2
@ -66,6 +66,15 @@ namespace dxvk::vk {
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VkResult Presenter::waitForFence(VkFence fence) {
|
||||||
|
// Ignore timeouts, we don't want to block the
|
||||||
|
// app indefinitely if something goes wrong
|
||||||
|
return m_vkd->vkWaitForFences(
|
||||||
|
m_vkd->device(), 1, &fence, VK_FALSE,
|
||||||
|
1'000'000'000ull);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
VkResult Presenter::presentImage(VkSemaphore wait) {
|
VkResult Presenter::presentImage(VkSemaphore wait) {
|
||||||
VkPresentInfoKHR info;
|
VkPresentInfoKHR info;
|
||||||
|
@ -132,6 +132,17 @@ namespace dxvk::vk {
|
|||||||
VkFence fence,
|
VkFence fence,
|
||||||
uint32_t& index);
|
uint32_t& index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Waits for fence to get signaled
|
||||||
|
*
|
||||||
|
* Helper method that can be used in conjunction
|
||||||
|
* with the fence passed to \ref acquireNextImage.
|
||||||
|
* \param [in] fence Fence to wait on
|
||||||
|
* \returns Status of the operation
|
||||||
|
*/
|
||||||
|
VkResult waitForFence(
|
||||||
|
VkFence fence);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Presents current image
|
* \brief Presents current image
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user