mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 05:52:11 +01:00
[d3d11] Block on image acquisition fence before presenting
May potentially improve frame timing on drivers where image acquisition does not block.
This commit is contained in:
parent
b6804a95b7
commit
e03b574cc1
@ -227,7 +227,7 @@ namespace dxvk {
|
||||
uint32_t imageIndex = 0;
|
||||
|
||||
VkResult status = m_presenter->acquireNextImage(
|
||||
sync.acquire, VK_NULL_HANDLE, imageIndex);
|
||||
sync.acquire, sync.fence, imageIndex);
|
||||
|
||||
while (status != VK_SUCCESS && status != VK_SUBOPTIMAL_KHR) {
|
||||
RecreateSwapChain(m_vsync);
|
||||
@ -236,9 +236,12 @@ namespace dxvk {
|
||||
sync = m_presenter->getSyncSemaphores();
|
||||
|
||||
status = m_presenter->acquireNextImage(
|
||||
sync.acquire, VK_NULL_HANDLE, imageIndex);
|
||||
sync.acquire, sync.fence, imageIndex);
|
||||
}
|
||||
|
||||
// Wait for image to become actually available
|
||||
m_presenter->waitForFence(sync.fence);
|
||||
|
||||
// Use an appropriate texture filter depending on whether
|
||||
// the back buffer size matches the swap image size
|
||||
bool fitSize = m_swapImage->info().extent.width == info.imageExtent.width
|
||||
|
Loading…
x
Reference in New Issue
Block a user