Commit Graph

1351 Commits

Author SHA1 Message Date
evgenii babinets
7dd8af4ddb Backing out 18896978 due to another EngineTest failure. Original description:
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]
2022-02-09 09:35:00 -05:00
christopher waters
343ba94423 Deprecating RHI*CommandList::SetComputeShader and switching uses to the PSO cache's SetComputePipelineState. This is to get compute shaders in our PSO cache lists as well as move towards ComputePipelineState as the default binding method.
#jira none
#rb arciel.rekman, mihnea.balta, jeannoe.morissette
#preflight 6202a549e85c7a08bbee815f

[CL 18905326 by christopher waters in ue5-main branch]
2022-02-08 13:19:37 -05:00
evgenii babinets
00605f283c 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

[CL 18896978 by evgenii babinets in ue5-main branch]
2022-02-07 20:04:27 -05:00
pj kack
6a68bde0d8 Fix non-deterministic sorting in iostore shader group compression logic.
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]
2022-02-07 12:30:43 -05:00
eric mcdaniel
4ae57bc005 [Backout] - CL18864159
- 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]
2022-02-04 20:48:30 -05:00
richard wallis
c13b410b24 Fix DumpGPU on macOS. Begin Resource Dump occurs in: FSlateApplication::Get().Tick(ESlateTickType::PlatformAndInput); which is after GEngine->Tick(FApp::GetDeltaTime(), bIdleMode);. Make the defered dump command request a GPU dump for the next frame by adding an InitDump function so it's clear for any platform when to begin. Could add 1 when setting the DumpingFrameCounter_GameThread but that seems brittle across platforms.
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]
2022-02-04 12:01:46 -05:00
evgenii babinets
1446e36b0f 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 18864159 by evgenii babinets in ue5-main branch]
2022-02-04 11:07:20 -05:00
aleksander netzel
9a8aa76713 Add ERDGPassFlags::NeverParallel to allow RDG passes to stay on render thread.
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]
2022-02-03 09:15:49 -05:00
fred kimberley
7fbfaf57c8 Require explicit constructors/casts when converting between FVector, FVector3d, and FVector3f.
#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]
2022-02-02 07:59:31 -05:00
guillaume abadie
362dfdc40e Dumps all cvars in DumpGPU captures
#rb juan.canada
[FYI] juan.canada
#jira none
#preflight 61f9217d8b4112f7cc932f3b

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 18807104 in //UE5/Release-5.0/... via CL 18809178 via CL 18822216
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18823245 by guillaume abadie in ue5-main branch]
2022-02-02 05:28:48 -05:00
jeremy moore
d362cef172 #jira UE-136254
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]
2022-02-02 01:49:39 -05:00
jeremy moore
e9b8605b3b Add r.VelocityOutputPass render setting and deprecated r.BasePassOutputsVelocity and r.DepthPassMergedWithVelocity.
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]
2022-02-01 09:53:17 -05:00
christopher waters
112a73b5c6 Adding depth clip control to the rasterizer state.
#jira UE-85381
#rb mihnea.balta, will.damon, jeannoe.morissette, arciel.rekman, luke.thatcher, eric.mcdaniel, florin.pascu, dmitriy.dyomin
#preflight 61f8545c114ec25fe0b4d12c

[CL 18799473 by christopher waters in ue5-main branch]
2022-01-31 17:28:38 -05:00
zach bethel
9996233f7a Removed unused legacy MSAA multi-texture support from IPooledRenderTarget.
- 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]
2022-01-31 17:22:31 -05:00
zach bethel
2230e96167 Removal of RDG drain experiment for UE5 release. It is currently unused and hasn't proven itself necessary yet. It would be relatively straightforward to re-add if the need arises in the future.
#rb mihnea.balta
#preflight 61f82d9b3e13556eb9c3eb34

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 18794948 in //UE5/Release-5.0/... via CL 18795422 via CL 18796381
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18796735 by zach bethel in ue5-main branch]
2022-01-31 15:55:31 -05:00
guillaume abadie
7804f9bc28 Fixes DumpGPU's resource search by savings all resource descriptors into a single Base/ResourceDesc.json file
#rb none
[FYI] juan.canada
#preflight 61f8112d68795b2f4577da7d

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 18791631 in //UE5/Release-5.0/... via CL 18791880 via CL 18792459
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18792532 by guillaume abadie in ue5-main branch]
2022-01-31 12:53:35 -05:00
Andrew Davidson
4a3e582384 LWC: Remove UE_LARGE_WORLD_COORDINATES_DISABLED toggle
#rb stephen.holmes
[FYI] zak.middleton
#preflight 61f7d18b114ec25fe09648d6

#ROBOMERGE-OWNER: Andrew.Davidson
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18788533 in //UE5/Release-5.0/... via CL 18788583 via CL 18788850
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)
#ROBOMERGE-CONFLICT from-shelf
#preflight 61f7eb7a114ec25fe0990f8c

[CL 18789644 by Andrew Davidson in ue5-main branch]
2022-01-31 10:10:51 -05:00
aleksander netzel
ad5a49f993 Fix incorrect checks in RayTracingGeometry:
* 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]
2022-01-31 06:22:37 -05:00
chris genova
bc08b28872 Re-enable the incremental user PSO cache by having it save at shutdown.
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]
2022-01-30 08:19:37 -05:00
ola olsson
b5219b04e6 Remove Geometry Shader path for point-light shadow rendering, disable point light shadows if VertexShaderLayer is not supported (at runtime).
- 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]
2022-01-28 06:36:41 -05:00
zak middleton
36c99f6887 #ue5 - LWC: FVector4f <-> FVector4d conversion is now explicit.
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]
2022-01-27 03:30:41 -05:00
alejandro arango
89a52a72d5 RealtimeGPUProfiler: Fix crash when toggling views.
Needed to clear description string buffer offsets when the description is empty (or invalid).

#jira UE-139319
#rb none
#rnx
[FYI] jason.hoerner
#preflight 61f1fd18c0033b39f8a65fc4

#ROBOMERGE-AUTHOR: alejandro.arango
#ROBOMERGE-SOURCE: CL 18749105 in //UE5/Release-5.0/... via CL 18749108 via CL 18749160
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18749174 by alejandro arango in ue5-main branch]
2022-01-26 21:23:15 -05:00
zach bethel
25f20493c4 Backing out changes to remove unknown states in pooled resources. Unported code is still transitioning pooled resources while not updating the tracked state. This will result in incorrect before states.
#rb none
#preflight 61f1920ef8088a3d298fb3a9

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 18740193 in //UE5/Release-5.0/... via CL 18740756 via CL 18741541
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18742250 by zach bethel in ue5-main branch]
2022-01-26 15:04:14 -05:00
jeannoe morissette
c8734e7588 Also clear AllocatedBufferHashes in FRDGBufferPool::ReleaseDynamicRHI so that both arrays always match. Keeps the FRDGBufferPool in a reusable state for experiments.
#rb zach.bethel
#preflight 61f1884273238441cb646293

#ROBOMERGE-AUTHOR: jeannoe.morissette
#ROBOMERGE-SOURCE: CL 18738113 in //UE5/Release-5.0/... via CL 18738347 via CL 18739391
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18739973 by jeannoe morissette in ue5-main branch]
2022-01-26 13:54:46 -05:00
jason nadro
db3c90d3cd Adding scoped CPU markers for the most expensive parts of GlobalBeginCompileShader and FShaderCompilingManager::SubmitJobs.
- FShaderType::AddReferencedUniformBufferIncludes
- GetInputHash

#rb trivial
#preflight 61f1783ce12e3fcf9b1c99bb

#ROBOMERGE-AUTHOR: jason.nadro
#ROBOMERGE-SOURCE: CL 18736884 in //UE5/Release-5.0/... via CL 18736905 via CL 18738207
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18738664 by jason nadro in ue5-main branch]
2022-01-26 13:04:29 -05:00