Post-merge fixes

This commit is contained in:
Wojciech Figat
2022-03-28 20:04:29 +02:00
parent a9061eb44f
commit 2b9a03d9bc
2 changed files with 4 additions and 1 deletions

View File

@@ -276,7 +276,6 @@ bool GPUDeviceDX11::Init()
factory5->Release();
}
// Get flags and device type base on current configuration
uint32 flags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;
#if GPU_ENABLE_DIAGNOSTICS

View File

@@ -138,10 +138,12 @@ void GPUSwapChainDX11::Present(bool vsync)
// Present frame
ASSERT(_swapChain);
UINT presentFlags = 0;
#if PLATFORM_WINDOWS
if (!vsync && !_isFullscreen && _allowTearing)
{
presentFlags |= DXGI_PRESENT_ALLOW_TEARING;
}
#endif
const HRESULT result = _swapChain->Present(vsync ? 1 : 0, presentFlags);
LOG_DIRECTX_RESULT(result);
@@ -159,7 +161,9 @@ bool GPUSwapChainDX11::Resize(int32 width, int32 height)
_device->WaitForGPU();
GPUDeviceLock lock(_device);
#if PLATFORM_WINDOWS
_allowTearing = _device->AllowTearing;
#endif
_format = GPU_BACK_BUFFER_PIXEL_FORMAT;
#if PLATFORM_WINDOWS