A lot of files touched, but generally it's a mechanical matter of removing the global variable GNumAlternateFrameRenderingGroups, and treating all code using it as if it's a fixed constant of one. If a conditional becomes always false, the code block is removed. Certain utility functions only called from dead stripped AFR code are then removed (e.g. RHIBroadcastTemporalEffect). On the D3D11 side, RHIBeginUpdateMultiFrameResource / RHIEndUpdateMultiFrameResource become NOPs (return at the top of the function) when GNumAlternateFrameRenderingGroups is 1, so those are removed across the board.
#jira none
#rb jason.nadro
#preflight 63cea0afb91ac945f5117110
[CL 23820752 by jason hoerner in ue5-main branch]
The RDG builder holds a scope in order to avoid deletion of any resources during the graph setup / execution. This resolves the need to hold a strong reference during the RDG graph lifetime.
If FlushPendingDeletes is called within one of these scopes, the resources are instead queued onto the immediate command list and flushed at the end of the scope.
This change removes strong references held of uniform buffers held by RHI commands and certain platform contexts. When a flush is encountered, the backends will clear all caches removing any potential dangling references.
Resources can opt out of lifetime extension by calling ->DisableLifetimeExtension(). Subsequent calls to FlushPendingDeletes will release the resource immediately. This is used by a couple edge cases where resources must be deleted mid-frame (namely, DumpGPU and BVH building).
#rb christopher.waters
#preflight 63c5e5722e714f64ad017cfd
[CL 23734079 by zach bethel in ue5-main branch]
Move nanite programmable raster command list build to parallel translate tasks to offload RHI thread on PC
[REVIEW] [at]yuriy.odonnell, [at]zach.bethel, [at]luke.thatcher, [at]mihnea.balta
#localization none
#tests ran local replay and compared perf with it on and off and saves around 3 to 4 msec on rhi thread
[CL 23227976 by luke thatcher in ue5-main branch]
- Moved dispatch busy-wait out of the command-list recording task. Allows the render thread to help with jobs once it's done.
- Added workload to pass to help load balancing.
[CL 23025379 by zach bethel in ue5-main branch]
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]
- Passes are added to a queue that is consumed by a task to perform pass setup actions.
- Moved CompilePassBarriers to overlap with resource collection.
- Converted most tasks to new task system.
#preflight 630e5e2e660db81edb9a0562
[CL 21710710 by zach bethel in ue5-main branch]
Headers are updated to contain any missing #includes needed to compile and #includes are sorted. Nothing is removed.
#ushell-cherrypick of 21065896 by bryan.sefcik
#preflight 62d4b1a5a6141b6adfb0c892
#jira
#ROBOMERGE-OWNER: Bryan.sefcik
#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)
#ROBOMERGE-CONFLICT from-shelf
[CL 21181076 by Bryan sefcik in ue5-main branch]
[FYI] zach.bethel
Original CL Desc
-----------------------------------------------------------------
Move RDG buffer uploads off the render thread.
Maybe be related to gpu crash in EMT (UE-157850)
#preflight 62b9f1ec4209c7c579df8fc2
#ushell-cherrypick of 20839110 by zach.bethel
#ROBOMERGE-OWNER: ben.woodhouse
#ROBOMERGE-AUTHOR: serge.bernier
#ROBOMERGE-COMMAND: _robomerge ue5-main
#ROBOMERGE-SOURCE: CL 21010071 via CL 21010165 via CL 21010189
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)
[CL 21020108 by serge bernier in ue5-main branch]