mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[d3d11] Don't use presentation fence
This commit is contained in:
parent
81f6ccb1be
commit
981ea547f9
@ -34,10 +34,6 @@ namespace dxvk {
|
|||||||
InitRenderState();
|
InitRenderState();
|
||||||
InitSamplers();
|
InitSamplers();
|
||||||
InitShaders();
|
InitShaders();
|
||||||
|
|
||||||
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -238,7 +234,7 @@ namespace dxvk {
|
|||||||
uint32_t imageIndex = 0;
|
uint32_t imageIndex = 0;
|
||||||
|
|
||||||
VkResult status = m_presenter->acquireNextImage(
|
VkResult status = m_presenter->acquireNextImage(
|
||||||
sync.acquire, sync.fence, imageIndex);
|
sync.acquire, VK_NULL_HANDLE, imageIndex);
|
||||||
|
|
||||||
while (status != VK_SUCCESS && status != VK_SUBOPTIMAL_KHR) {
|
while (status != VK_SUCCESS && status != VK_SUBOPTIMAL_KHR) {
|
||||||
RecreateSwapChain(m_vsync);
|
RecreateSwapChain(m_vsync);
|
||||||
@ -247,13 +243,9 @@ namespace dxvk {
|
|||||||
sync = m_presenter->getSyncSemaphores();
|
sync = m_presenter->getSyncSemaphores();
|
||||||
|
|
||||||
status = m_presenter->acquireNextImage(
|
status = m_presenter->acquireNextImage(
|
||||||
sync.acquire, sync.fence, imageIndex);
|
sync.acquire, VK_NULL_HANDLE, imageIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for image to become actually available
|
|
||||||
if (m_usePresentFence)
|
|
||||||
m_presenter->waitForFence(sync.fence);
|
|
||||||
|
|
||||||
// Use an appropriate texture filter depending on whether
|
// Use an appropriate texture filter depending on whether
|
||||||
// the back buffer size matches the swap image size
|
// the back buffer size matches the swap image size
|
||||||
bool fitSize = m_swapImage->info().extent.width == info.imageExtent.width
|
bool fitSize = m_swapImage->info().extent.width == info.imageExtent.width
|
||||||
|
@ -118,8 +118,6 @@ namespace dxvk {
|
|||||||
bool m_dirty = true;
|
bool m_dirty = true;
|
||||||
bool m_vsync = true;
|
bool m_vsync = true;
|
||||||
|
|
||||||
bool m_usePresentFence = true;
|
|
||||||
|
|
||||||
void PresentImage(UINT SyncInterval);
|
void PresentImage(UINT SyncInterval);
|
||||||
|
|
||||||
void FlushImmediateContext();
|
void FlushImmediateContext();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user