This change includes significant refactor work performed in //UE5/Dev-ParallelRendering. A brief summary of the work is as follows:
Refactored RHI command lists
- Removal of the "immediate" async compute command list
- Introduced an "active pipe" on each command list, allowing RHICmdLists to record work for either graphics or async compute. Pipes can be selected using the SwitchPipeline() function, or the FRHICommandListScopedPipeline helper.
- New explicit command list submission RHI API (RHIFinalizeContext, RHISubmitCommandLists). The IRHICommandContextContainer type has been removed.
- Explicit GPU submission is automatically appended to the immediate command list when it is dispatched to the RHI thread.
Platform RHI implementations
- The new submission API has been implemented across all platforms. Some platforms required a significant refactor.
#rb Mihnea.Balta,Kenzo.Terelst
#jira UE-139550
#preflight 6332e3641003050806d802ef
[CL 22239063 by luke thatcher in ue5-main branch]
Supply a mesh LOD index into MDC batching CS so it can fetch a correct lighting information for each instance
#rb ola.olsson
#jira UE-164402
#preflight 632d8688671a1a24b564bd0c
[CL 22163633 by dmitriy dyomin in ue5-main branch]
The separated standard translucent is only ran when distortion is present and enabled with r.Translucency.StandardSeparated=1.
Only executed when distortion is present to avoid self distortion issues.
Modifed bSeparateTranslucencyModulate to be bTranslucencyModulate that then needs to be combined with Normal or Separate translucency tag.
#jira UE-147602
#rb Charles.derousiers
#preflight https://horde.devtools.epicgames.com/job/6319a0e9ec45fbf3d71e276c
[CL 21916998 by Sebastien Hillaire in ue5-main branch]
- Removed scene render mem-mark among others. MemStack usage is now restricted to local scopes with known marks.
- Render resources with destructors are allocated using the FSceneRenderingBulkObjectAllocator on FSceneRenderer, which is deleted when the scene render is.
#preflight 62b266e20d4d6228de97babe
#rb mihnea.balta, yuriy.odonnell
[CL 20907647 by zach bethel in ue5-main branch]
This technique is guarded with by a projected settings. It is currently only supported on PC Dx12. This is the initial step for fine grain/per-pixel sorting.
#rb sebastien.hillaire
#jira none
#preflight 623a1884bc1cf2803867d8f8
[CL 19470340 by charles derousiers in ue5-main branch]
* Updates to the VirtualShadowMapArrayCacheManager to support the invalidation of cache pages upon removal of dynamic primitives
* Various updates and fixes to support writing dynamic primitives' instance scene data and instance payload data from the GPU
* All these changes are needed by a few existing systems that will be using them soon to render via GPU Scene
(NOTE: This change is a resubmit of 18375369 with CIS fixes that caused it to be backed out)
#rb ola.olsson
#preflight 61ae4176353890ce23d75a95
#ROBOMERGE-AUTHOR: jamie.hayes
#ROBOMERGE-SOURCE: CL 18384716 in //UE5/Release-5.0/... via CL 18384780
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)
[CL 18384814 by jamie hayes in ue5-release-engine-test branch]
[FYI] jamie.hayes
Original CL Desc
-----------------------------------------------------------------
* Updates to GPU Scene and the GPUSceneCollector to support handling the upload of multiple instances and instance payload data for dynamic primitives
* Updates to the VirtualShadowMapArrayCacheManager to support the invalidation of cache pages upon removal of dynamic primitives
* Various updates and fixes to support writing dynamic primitives' instance scene data and instance payload data from the GPU
* All these changes are needed by a few existing systems that will be using them soon to render via GPU Scene
#rb ola.olsson
#ROBOMERGE-AUTHOR: aurel.cordonnier
#ROBOMERGE-SOURCE: CL 18375767 via CL 18375771 via CL 18375781
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18375783 by aurel cordonnier in ue5-release-engine-test branch]
* Updates to the VirtualShadowMapArrayCacheManager to support the invalidation of cache pages upon removal of dynamic primitives
* Various updates and fixes to support writing dynamic primitives' instance scene data and instance payload data from the GPU
* All these changes are needed by a few existing systems that will be using them soon to render via GPU Scene
#rb ola.olsson
#ROBOMERGE-AUTHOR: jamie.hayes
#ROBOMERGE-SOURCE: CL 18359911 via CL 18375369 via CL 18375397
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18375424 by jamie hayes in ue5-release-engine-test branch]
(cherry pick of 17507631 including later followup fixes in 17526511 and 17542272)
- Disable RDG parallel execution on D3D11.
- Precreate ClearReplacement shaders
- Also add a check to catch other possible issues before it's too late.
#rb Chris.Waters (in Dev-EMT)
#jira UE-125050
#ushell-cherrypick of 17507631 by Arciel.Rekman
#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 17586312 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)
[CL 17586354 by arciel rekman in ue5-release-engine-test branch]
Always translate primitive ID for use by mesh draw commands.
Fixes regression from 17093848 which meant that we sometimes earlied out from TranslatePrimitiveId() for a deferred translate that no longer happens.
#preflight 6139374fd9c85a00018dae0e
#rb dmitriy.dyomin
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17466025 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)
[CL 17466057 by jeremy moore in ue5-release-engine-test branch]
Run a compute job that packs most commonly used instance data (LocalToWorld matrix and some other bits - 80 bytes) into per-instance vertex buffer. Vertex shader does not have access to GPUScene and instead loads instance data from a per-instance vertex buffer. If it needs more primitive/instance data than available then it will load it from Primitive UB, binding unique uniform buffer and breaking auto-instancing. Pixel shader has a full access to a GPUScene
There are 3 ways how FSceneDataIntermediates gets populated
1. PrimitiveId + GPUScene (Desktop)
2. Per-Instance data + Primitive UB (Mobile)
3. Primitive UB (auto-instancing disabled)
Details for GPUScene specific vertex inputs and access to FSceneDataIntermediates are hidden behind a macro:
VF_GPUSCENE_DECLARE_INPUT_BLOCK
VF_GPUSCENE_GET_INTERMEDIATES
FSceneDataIntermediates is now stored in FVertexFactoryIntermediates, FMaterialVertexParameters. Added a few GetPrimitiveData() overloads that allows you to access PrimitiveData depending on current context. Removed most of the cases where GetPrimitiveData() gets used with PrimitiveId.
#rb Ola.Ollson
#ROBOMERGE-SOURCE: CL 17093848 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)
[CL 17093856 by dmitriy dyomin in ue5-release-engine-test branch]
Move SubmitDrawCommands functionality into FInstanceCullingContext so we may use per-draw auxiliary information collected at Setup step
"UnCulled" bucket will use an optimized permutation that assumes that all submitted items are 'single instance'.
#rb ola.olsson
[FYI] krzysztof.narkowicz
#ROBOMERGE-SOURCE: CL 17029558 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v846-17029325)
[CL 17029645 by dmitriy dyomin in ue5-release-engine-test branch]