Second attempt at fixing a GameThread stall (waiting for render thread) whenever a CVar is changed during gameplay.
It seems like the intent of the callback sink for r.FreeSkeletalMeshBuffers was to free eligible CPU buffers when the CVar was raised to 1, but unfortunately we're currently relying on this sink to free certain helper structures.
This change allows those structures to be freed after submitting the buffers to RHI so that we can change the callback sink to only do work on the rising edge (which generally only happens when switching game-mode/device profile and not during gameplay).
#rb josie.yang
#preflight 62017cbae9567e667308aa18
#ROBOMERGE-OWNER: evgenii.babinets
#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 18894475 via CL 18894521 via CL 18894553 via CL 18896447 via CL 18896609
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
#ROBOMERGE-CONFLICT from-shelf
#preflight 6203cc23530b346f8618b67b
[CL 18917352 by evgenii babinets in ue5-main branch]
It seems like the intent of the callback sink for r.FreeSkeletalMeshBuffers was to free eligible CPU buffers when the CVar was raised to 1, but unfortunately we're currently relying on this sink to free certain helper structures.
This change allows those structures to be freed after submitting the buffers to RHI so that we can change the callback sink to only do work on the rising edge (which generally only happens when switching game-mode/device profile and not during gameplay).
#rb josie.yang
#preflight 62017cbae9567e667308aa18
#ROBOMERGE-OWNER: evgenii.babinets
#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 18894475 via CL 18894521 via CL 18894553 via CL 18896447 via CL 18896609
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
#ROBOMERGE-CONFLICT from-shelf
[CL 18896978 by evgenii babinets in ue5-main branch]
Replace the map with an array for efficiency.
#jira UE-141110
#rb arciel.rekman
#rnx
#preflight 61fc374ca540d6e61bba7104
#ROBOMERGE-AUTHOR: pj.kack
#ROBOMERGE-SOURCE: CL 18886818 in //UE5/Release-5.0/... via CL 18886830 via CL 18887180
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18887383 by pj kack in ue5-main branch]
- backing out this change as it broke Xbox in UE5/Main
- Example failed Horde tests:
- https://horde.devtools.epicgames.com/job/61fd7dc8a6165e535689f6e4?step=0856
- https://horde.devtools.epicgames.com/job/61fd7dc8a6165e535689f6e4?step=0250
#rb evgenii.babinets
#jira none
#preflight 61fdcfa1e65336d1455736bc
#fyi evgenii.babinets
Original CL Desc
-----------------------------------------------------------------
Fixed a GameThread stall (waiting for render thread) whenever a CVar is changed during gameplay.
It seems like the intent of the callback sink for r.FreeSkeletalMeshBuffers was to free eligible CPU buffers when the CVar was raised to 1, but unfortunately we're currently relying on this sink to free certain helper structures.
This change allows those structures to be freed after submitting the buffers to RHI so that we can change the callback sink to only do work on the rising edge (which generally only happens when switching game-mode/device profile and not during gameplay).
#rb josie.yang
#preflight Horde doesn't work, but compiled locally.
#ROBOMERGE-OWNER: evgenii.babinets
#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 18862796 via CL 18862801 via CL 18862826 via CL 18863875 via CL 18864138
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18878916 by eric mcdaniel in ue5-main branch]
Allow more flexibility of the Metal RHICopyToResolveTarget to include compatable texture view pixelformats. Fixes validation error when resolving between sRGB and RGB formats.
FMetalContext: don't assert then go into the weeds on macOS when there are no render targets.
#jira UE-140658, UE-120222
#preflight 61fd124b2839dd07cb98d771
[REVIEW] [at]will.damon, [at]Guillaume.Abadie
#rb will.damon, Guillaume.Abadie
#lockdown cristina.riveron
#rnx
#ROBOMERGE-AUTHOR: richard.wallis
#ROBOMERGE-SOURCE: CL 18864871 in //UE5/Release-5.0/... via CL 18864881 via CL 18865081
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18865102 by richard wallis in ue5-main branch]
It seems like the intent of the callback sink for r.FreeSkeletalMeshBuffers was to free eligible CPU buffers when the CVar was raised to 1, but unfortunately we're currently relying on this sink to free certain helper structures.
This change allows those structures to be freed after submitting the buffers to RHI so that we can change the callback sink to only do work on the rising edge (which generally only happens when switching game-mode/device profile and not during gameplay).
#rb josie.yang
#preflight Horde doesn't work, but compiled locally.
#ROBOMERGE-OWNER: evgenii.babinets
#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 18862796 via CL 18862801 via CL 18862826 via CL 18863875 via CL 18864138
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18864159 by evgenii babinets in ue5-main branch]
Both Immediate/AsyncCompute passes are always executed in order on the render thread but other RDG passes can run in parallel.
With my previous change, RayTracingScene pass was changed to Compute/AsyncCompute to have the correct order on the GPU.
But when it was set to Compute (when AsyncCompute was disabled) it was running in parallel with passes it depends on which led to random crashes.
Because the dependency between passes was implicit, we needed a new flag to express the intent and get the desired order between execution lambdas.
On behalf of Zach Bethel.
#rb zach.bethel
#jira UE-141003
#preflight 61fb0d9e923ac18db7015160
#lockdown michal.valient
#ROBOMERGE-AUTHOR: aleksander.netzel
#ROBOMERGE-SOURCE: CL 18841970 in //UE5/Release-5.0/... via CL 18841984 via CL 18842341
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18842374 by aleksander netzel in ue5-main branch]
#jira UE-122078
#rb Andrew.Davidson, Colin.McGinley
#preflight standard build
#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 18817999 in //UE5/Release-5.0/... via CL 18818012 via CL 18822871
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18824721 by fred kimberley in ue5-main branch]
Fix MipLevel sample mode with Adaptive Virtual Texture.
#preflight 61f88a0bf657e25a590668d4
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 18803237 in //UE5/Release-5.0/... via CL 18803254 via CL 18821582
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)
[CL 18821667 by jeremy moore in ue5-main branch]
r.VelocityOutputPass supports the 3 valid settings: depth pass, base pass, after base pass.
#rb rob.krajcarski
#preflight 61f86031114ec25fe0b87dab
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 18799499 in //UE5/Release-5.0/... via CL 18801888 via CL 18802482
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)
[CL 18808175 by jeremy moore in ue5-main branch]
- Deprecated legacy members from FPooledRenderTargetDesc.
- Deprecated ETextureRenderTarget and removed from RDG.
- TargetableTexture always equals ShaderResourceTexture.
- Simplified render target pool FindFreeElement.
- Create pooled buffers and textures with a known state.
#rb graham.wihlidal
#preflight 61f8488568795b2f45852274
#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 18796880 in //UE5/Release-5.0/... via CL 18797840 via CL 18799070
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)
[CL 18799188 by zach bethel in ue5-main branch]
* Add InitializedState to RayTracingGeometry that will track how it is was crated. We cannot use provided Initializer for that because it's reset during mesh streaming.
* Use BUF_RayTracingScratch for dynamic geometry scratch buffer so we can always guarantee correct alignment.
* Add RayTracingGeometry empty ctor so we don't try to calculate the BLAS size when it is streamed out.
#rb Yuriy.Odonnell
#preflight 61f7b9d0e55232619f77fd04
#ROBOMERGE-AUTHOR: aleksander.netzel
#ROBOMERGE-SOURCE: CL 18787906 in //UE5/Release-5.0/... via CL 18787924 via CL 18788019
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)
[CL 18788021 by aleksander netzel in ue5-main branch]
Enable PSO cache CVars by default on Windows. This has no effect on D3D11 since the cache is disabled if GRHISupportsPipelineFileCache is false.
#ROBOMERGE-AUTHOR: chris.genova
#ROBOMERGE-SOURCE: CL 18785319 via CL 18785326 via CL 18785329 via CL 18785330 via CL 18785331 via CL 18785353 via CL 18785366
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)
[CL 18785369 by chris genova in ue5-main branch]
- Add r.Shadow.DetectVertexShaderLayerAtRuntime to make it possible to force (for DX11/12/SM5/Vulkan) compilation of vslayer despite RHISupportsVertexShaderLayer being false.
- Set r.Shadow.DetectVertexShaderLayerAtRuntime in WindowsEngine.ini,WinGDKEngine.ini & LinuxEngine.ini.
- Add DoesRuntimeSupportOnePassPointLightShadows to determine support at runtime.
- Fix bug excluding Nanite meshes from DF shadows for local lights if VSM is enabled (now only affects directional lights).
- Add OnGetOnScreenMessages to enable modular generation of on-screen messages in the scene renderer (aimed at transient rendering processes).
#rb arciel.rekman,andrew.lauritzen
#jira UE-138933
#preflight 61f3c967da54035207f6e560
#ROBOMERGE-AUTHOR: ola.olsson
#ROBOMERGE-SOURCE: CL 18769670 in //UE5/Release-5.0/... via CL 18769671 via CL 18769765
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)
[CL 18769767 by ola olsson in ue5-main branch]
FLinearColor has also been modified to make any double->float conversions explicit. Previously all 3D TVector versions were allowed to be implicit and thus could convert TVector<double> => FLinearColor => TVector4<float>.
Fixed up all engine and game casts. Added "//LWC_TODO: precision loss" around any explicit casts that previously were silently explicit and we may need to revisit for precision loss analysis.
#jira UE-122085
#rb Ben.Ingram, Andrew.Davidson
#preflight 61f24af473238441cb7bb0f1
#ROBOMERGE-AUTHOR: zak.middleton
#ROBOMERGE-SOURCE: CL 18751249 in //UE5/Release-5.0/... via CL 18751253 via CL 18751319
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)
[CL 18751326 by zak middleton in ue5-main branch]