Skip to content

Commit

Permalink
[d3d11] Don't use presentation fence on ANV
Browse files Browse the repository at this point in the history
Should hopefully fix stuttering issues introduced with 1.0.
  • Loading branch information
doitsujin committed Mar 14, 2019
1 parent 1656860 commit 19f8282
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/d3d11/d3d11_swapchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ namespace dxvk {
InitShaders();

SetGammaControl(0, nullptr);

// The present fence seems to introduce stutter on ANV
if (m_device->adapter()->matchesDriver(DxvkGpuVendor::Intel, VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR, 0, 0))
m_usePresentFence = false;
}


Expand Down Expand Up @@ -240,7 +244,8 @@ namespace dxvk {
}

// Wait for image to become actually available
m_presenter->waitForFence(sync.fence);
if (m_usePresentFence)
m_presenter->waitForFence(sync.fence);

// Use an appropriate texture filter depending on whether
// the back buffer size matches the swap image size
Expand Down
2 changes: 2 additions & 0 deletions src/d3d11/d3d11_swapchain.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ namespace dxvk {
bool m_dirty = true;
bool m_vsync = true;

bool m_usePresentFence = true;

void PresentImage(UINT SyncInterval);

void FlushImmediateContext();
Expand Down

0 comments on commit 19f8282

Please sign in to comment.