This improves how the editor deals with displays that have different capabilities (some with HDR, others without).
Centralize where the CVars are accessed
Have the swapchain created in SDR when shown on a SDR display
Make sure color gamut matches the one supported by the platform/swapchain.
Allow Movie scene capture to override the gamut/output format to keep existing behaviour (MovieSceneCapture relies on swapchain data)
#preflight 628baef5183c1e13462a504d
#jira UE-150952
#rb luke.thatcher
[CL 20347067 by benjamin rouveyrol in ue5-main branch]
- Adding support for bindless resources/samplers. The loose resources have to be wrapped in a macro that generates an index and proxy resource when bindless is enabled. Reflection has to parse these differently from other resources since they're parsed as uint parameters. The runtime also has to bind these differently since they end up needing to find their real resource in the binding data and then update a constant buffer.
- To assist in conversions, the shader compiler will detect if a shader is compiled with both bindless and non-bindless resources/samplers and will emit errors if that is the case.
- Adding support for bindless Uniform Buffer resources/samplers. Because Uniform Buffers aren't per-shader, they'll always update their constants with the bindless indices of their resources.
- Adding more flags to FShaderCodePackedResourceCounts required changing all the array initializations to individual parameters since not all the new flags are used everywhere.
- No shaders have been configured to support bindless resources/samplers. Yet.
#jira UE-139616
#rb zach.bethel, arciel.rekman
#preflight 6282b8ec44349a6581a21a39
[CL 20250348 by christopher waters in ue5-main branch]
- A zero size now uses the source texture size adjusted to the source mip.
- Source / dest offsets and size now properly scale with each successive mip level.
- Fixed bug in reflection capture GPU copy due to inconsistent behavior.
- Deprecated GRHISupportsCopyToTextureMultipleMips which is now always true.
#rb brian.white
#preflight 627fc1af3339713c4a9800da
[CL 20224824 by zach bethel in ue5-main branch]
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]
fix RHI upload of textures that are multiple of 4 in top mip but not in lower mips
dont pad CompressedImage sizes, store true size
clean up Texture size limits and VT conditions
better default settings for texture import
clean up initialization order of TextureFormatManagerModule
#preflight 6250814a11261bc7b23d8f4b
#rb fabian.giesen,julien.stjean
[CL 19693287 by charles bloom in ue5-main branch]
Panic allows only one thread to become the panic thread. In panic mode, logs are only sent to panic-safe output devices. Each call to Panic flushes buffered logs to panic-safe output devices, and flushes panic-safe output devices.
#jira UE-147152
#preflight 62424814292f228e09d8a612
#rb Zousar.Shaker
#fyi Brandon.Schaefer
[CL 19545093 by Devin Doucette in ue5-main branch]