You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Converge the way we do HDR in editor for both d3d11 and d3d12. This assumes that IDXGIOutput6 is available, but AFAICT, Editor.HDRSupport / FD3D11Viewport::CheckHDRMonitorStatus was requiring it anyway (https://p4-swarm.epicgames.net/changes/8174116 - WindowsD3D11Viewport.cpp#20 FD3D11Viewport::CheckHDRMonitorStatus). Notes for future self: Editor was initially done with HDR10 (see FD3D11Viewport constructor where it forces swapchain format to DXGI_FORMAT_R10G10B10A2_UNORM). However, it got de-hardcoded with 17369147 which was a good idea, but unfortunately GRHIHDRDisplayOutputFormat is left to the default value on d3d11, which is PF_FloatRGBA. CheckColorSpaceSupport would now fail, not returning DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT (PF_FloatRGBA only supports scRGB, not DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020) and we would not setup the swapchain colorspace properly. Since it looks like DXGI 1.6 was always needed for editor, I'm changing the code to be the same between d3d11 and d3d12. Both editors now use scRGB for HDR, which is consistent with ChooseHDRDeviceAndColorGamut #jira UE-151184 #preflight 6273eaba03269096abc98cbb #rb christopher.waters [CL 20139224 by benjamin rouveyrol in ue5-main branch]