mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +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;
|
||||
}
|
||||
|
||||
|
||||
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) {
|
||||
VkPresentInfoKHR info;
|
||||
|
@ -132,6 +132,17 @@ namespace dxvk::vk {
|
||||
VkFence fence,
|
||||
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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user