Post-merge fixes
This commit is contained in:
@@ -276,7 +276,6 @@ bool GPUDeviceDX11::Init()
|
|||||||
factory5->Release();
|
factory5->Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Get flags and device type base on current configuration
|
// Get flags and device type base on current configuration
|
||||||
uint32 flags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;
|
uint32 flags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;
|
||||||
#if GPU_ENABLE_DIAGNOSTICS
|
#if GPU_ENABLE_DIAGNOSTICS
|
||||||
|
|||||||
@@ -138,10 +138,12 @@ void GPUSwapChainDX11::Present(bool vsync)
|
|||||||
// Present frame
|
// Present frame
|
||||||
ASSERT(_swapChain);
|
ASSERT(_swapChain);
|
||||||
UINT presentFlags = 0;
|
UINT presentFlags = 0;
|
||||||
|
#if PLATFORM_WINDOWS
|
||||||
if (!vsync && !_isFullscreen && _allowTearing)
|
if (!vsync && !_isFullscreen && _allowTearing)
|
||||||
{
|
{
|
||||||
presentFlags |= DXGI_PRESENT_ALLOW_TEARING;
|
presentFlags |= DXGI_PRESENT_ALLOW_TEARING;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
const HRESULT result = _swapChain->Present(vsync ? 1 : 0, presentFlags);
|
const HRESULT result = _swapChain->Present(vsync ? 1 : 0, presentFlags);
|
||||||
LOG_DIRECTX_RESULT(result);
|
LOG_DIRECTX_RESULT(result);
|
||||||
|
|
||||||
@@ -159,7 +161,9 @@ bool GPUSwapChainDX11::Resize(int32 width, int32 height)
|
|||||||
|
|
||||||
_device->WaitForGPU();
|
_device->WaitForGPU();
|
||||||
GPUDeviceLock lock(_device);
|
GPUDeviceLock lock(_device);
|
||||||
|
#if PLATFORM_WINDOWS
|
||||||
_allowTearing = _device->AllowTearing;
|
_allowTearing = _device->AllowTearing;
|
||||||
|
#endif
|
||||||
_format = GPU_BACK_BUFFER_PIXEL_FORMAT;
|
_format = GPU_BACK_BUFFER_PIXEL_FORMAT;
|
||||||
|
|
||||||
#if PLATFORM_WINDOWS
|
#if PLATFORM_WINDOWS
|
||||||
|
|||||||
Reference in New Issue
Block a user