Enable flip presentation mode and tearing in D3D11

This commit is contained in:
GoaLitiuM
2022-03-17 21:05:42 +02:00
committed by Ari Vuollet
parent b780e33a5b
commit e794911755
5 changed files with 36 additions and 1 deletions

View File

@@ -265,6 +265,19 @@ bool GPUDeviceDX11::Init()
return true;
}
UpdateOutputs(adapter);
{
ComPtr<IDXGIFactory5> factory5;
_factoryDXGI->QueryInterface(IID_PPV_ARGS(&factory5));
if (factory5)
{
BOOL allowTearing;
if (SUCCEEDED(factory5->CheckFeatureSupport(DXGI_FEATURE_PRESENT_ALLOW_TEARING, &allowTearing, sizeof(allowTearing))) && allowTearing)
{
AllowTearing = true;
}
}
}
// Get flags and device type base on current configuration
uint32 flags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;