mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-27 16:05:42 -04:00
GPUDevice: Use FIFO for D3D exclusive fullscreen
This commit is contained in:
parent
22c76d43c3
commit
e6d8f0d4a0
@ -226,6 +226,13 @@ bool D3D11Device::CreateSwapChain()
|
|||||||
D3DCommon::GetRequestedExclusiveFullscreenModeDesc(m_dxgi_factory.Get(), client_rc, fullscreen_width,
|
D3DCommon::GetRequestedExclusiveFullscreenModeDesc(m_dxgi_factory.Get(), client_rc, fullscreen_width,
|
||||||
fullscreen_height, fullscreen_refresh_rate, dxgi_format,
|
fullscreen_height, fullscreen_refresh_rate, dxgi_format,
|
||||||
&fullscreen_mode, fullscreen_output.GetAddressOf());
|
&fullscreen_mode, fullscreen_output.GetAddressOf());
|
||||||
|
|
||||||
|
// Using mailbox-style no-allow-tearing causes tearing in exclusive fullscreen.
|
||||||
|
if (m_vsync_mode == GPUVSyncMode::Mailbox && m_is_exclusive_fullscreen)
|
||||||
|
{
|
||||||
|
WARNING_LOG("Using FIFO instead of Mailbox vsync due to exclusive fullscreen.");
|
||||||
|
m_vsync_mode = GPUVSyncMode::FIFO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -592,6 +599,13 @@ void D3D11Device::SetVSyncMode(GPUVSyncMode mode, bool allow_present_throttle)
|
|||||||
{
|
{
|
||||||
m_allow_present_throttle = allow_present_throttle;
|
m_allow_present_throttle = allow_present_throttle;
|
||||||
|
|
||||||
|
// Using mailbox-style no-allow-tearing causes tearing in exclusive fullscreen.
|
||||||
|
if (mode == GPUVSyncMode::Mailbox && m_is_exclusive_fullscreen)
|
||||||
|
{
|
||||||
|
WARNING_LOG("Using FIFO instead of Mailbox vsync due to exclusive fullscreen.");
|
||||||
|
mode = GPUVSyncMode::FIFO;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_vsync_mode == mode)
|
if (m_vsync_mode == mode)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -826,6 +826,13 @@ bool D3D12Device::CreateSwapChain()
|
|||||||
D3DCommon::GetRequestedExclusiveFullscreenModeDesc(m_dxgi_factory.Get(), client_rc, fullscreen_width,
|
D3DCommon::GetRequestedExclusiveFullscreenModeDesc(m_dxgi_factory.Get(), client_rc, fullscreen_width,
|
||||||
fullscreen_height, fullscreen_refresh_rate, fm.resource_format,
|
fullscreen_height, fullscreen_refresh_rate, fm.resource_format,
|
||||||
&fullscreen_mode, fullscreen_output.GetAddressOf());
|
&fullscreen_mode, fullscreen_output.GetAddressOf());
|
||||||
|
|
||||||
|
// Using mailbox-style no-allow-tearing causes tearing in exclusive fullscreen.
|
||||||
|
if (m_vsync_mode == GPUVSyncMode::Mailbox && m_is_exclusive_fullscreen)
|
||||||
|
{
|
||||||
|
WARNING_LOG("Using FIFO instead of Mailbox vsync due to exclusive fullscreen.");
|
||||||
|
m_vsync_mode = GPUVSyncMode::FIFO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1087,6 +1094,14 @@ std::string D3D12Device::GetDriverInfo() const
|
|||||||
void D3D12Device::SetVSyncMode(GPUVSyncMode mode, bool allow_present_throttle)
|
void D3D12Device::SetVSyncMode(GPUVSyncMode mode, bool allow_present_throttle)
|
||||||
{
|
{
|
||||||
m_allow_present_throttle = allow_present_throttle;
|
m_allow_present_throttle = allow_present_throttle;
|
||||||
|
|
||||||
|
// Using mailbox-style no-allow-tearing causes tearing in exclusive fullscreen.
|
||||||
|
if (mode == GPUVSyncMode::Mailbox && m_is_exclusive_fullscreen)
|
||||||
|
{
|
||||||
|
WARNING_LOG("Using FIFO instead of Mailbox vsync due to exclusive fullscreen.");
|
||||||
|
mode = GPUVSyncMode::FIFO;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_vsync_mode == mode)
|
if (m_vsync_mode == mode)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user