We noticed crashes in our application when we attempted to resize a window or switch to full-screen mode. Hence, resizing windows and switching to full screen will result in a crash on Unreal Engine 4.22 (and the latest 4.23).
Versions affects: 4.22, 4.23
OS: Windows 10
Description
Our approach to stereo rendering uses the HMD/Stereo Rendering Interface-implementation of Unreal Engine. When running in true stereoscopic mode, the resize buffers and Fullscreen functionality of the Unreal Engine pipeline is incorrectly implemented (Note we are using an AMD FirePro 5100, in the Passive (Dual Head) mode and duplicating the displays on two monitors).
The problematic line for DX11 can be found in D3D11Viewport.cpp, in void FD3D11Viewport::Resize(uint32,uint32,bool,EPixelFormat)at line 257:
VERIFYD3D11RESIZEVIEWPORTRESULT(SwapChain->ResizeBuffers(1…
This should be modified to use QuadStereoBufferEnabled, as in that mode we are using 2 buffers. We needed to ensure that we resized both L and R buffer chains.
Fix: The fix for this issue is as follows:
// Resize the swap chain.
DXGI_FORMAT RenderTargetFormat = GetRenderTargetFormat(PixelFormat);
if (D3DRHI->IsQuadBufferStereoEnabled())
{
VERIFYD3D11RESIZEVIEWPORTRESULT(SwapChain->ResizeBuffers(2, SizeX, SizeY, RenderTargetFormat, DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH), SizeX, SizeY, RenderTargetFormat, D3DRHI->GetDevice());
}
else
{
VERIFYD3D11RESIZEVIEWPORTRESULT(SwapChain->ResizeBuffers(1, SizeX, SizeY, RenderTargetFormat, DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH), SizeX, SizeY, RenderTargetFormat, D3DRHI->GetDevice());
}
Not sure how to reproduce, but can verify the code is changed in the way described below.
I am not able to find world outliner how to enable it?
How can i modify the param name in EQS node
How does UMG set overlapping layouts?
How to achieve HLSL Multiple Render Target in Material blueprints?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
What method is used to fill polygonal regions when drawing spline mesh at run time?
How to properly terminate the DoWork thread function in FAsyncTask?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-81269 in the post.
7 |
Component | UE - Virtual Production - nDisplay |
---|---|
Affects Versions | 4.22, 4.23 |
Target Fix | 4.24 |
Created | Oct 2, 2019 |
---|---|
Resolved | Oct 29, 2019 |
Updated | Dec 3, 2019 |