Commit Graph

152 Commits

Author SHA1 Message Date
henrik karlsson
8f20bd5cee [RenderCore]
* Moved dllexport from types to methods/staticvars

#rb none (approved by cwaters)

[CL 25902670 by henrik karlsson in ue5-main branch]
2023-06-09 16:04:27 -04:00
christopher waters
6c040372a1 Minor dependency cleanup in RenderGraphBuilder.
#preflight 644944a7401d328ad908ff40

[CL 25203033 by christopher waters in ue5-main branch]
2023-04-26 13:58:21 -04:00
christopher waters
d584acebf0 Removing deprecated RHI and RenderCore code.
#rb luke.thatcher
#preflight 644709d5f030f684d5fff54b

[CL 25180143 by christopher waters in ue5-main branch]
2023-04-25 10:24:28 -04:00
zach bethel
52304a3eda Modified RDG setup tasks to launch inline tasks, and added variants.
#preflight 6440aa4b73470c177cc51a6b

[CL 25122143 by zach bethel in ue5-main branch]
2023-04-19 23:24:06 -04:00
zach bethel
eeb206a886 Use SceneRenderingAllocator for RDG allocated arrays.
#preflight trivial

[CL 24428218 by zach bethel in ue5-main branch]
2023-02-27 13:49:29 -05:00
zach bethel
78dce5245b Added RDG AddSetupTask variant that takes a pipe and prerequisite tasks.
#preflight 63d3f7bdbe1970f882224701

[CL 23884432 by zach bethel in ue5-main branch]
2023-01-27 11:27:47 -05:00
jason hoerner
38521eae14 Multi-GPU: strip out Alternate Frame Rendering (AFR). Michal Valient requested this for 5.2. AFR has heavily decayed in 5.0, not supporting Lumen, Nanite, VSMs. and likely other newer features, and it's impossible even in principle to get most of those features to ever work in a performant way, due to their temporal nature. Removing this lowers maintenance and support costs for MGPU going forward.
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]
2023-01-23 15:30:48 -05:00
graham wihlidal
8057f357dd Initial (crude) working version of WIP Nanite material dispatch (shading via compute instead of graphics). Lots of work remaining, but a good milestone to submit. (Off by default with no impact to shader compilation)
#rb brian.karis
#fyi rune.stubbe, jamie.hayes, yuriy.odonnell, zach.bethel
#preflight skip

[CL 23782489 by graham wihlidal in ue5-main branch]
2023-01-19 17:44:35 -05:00
wouter dek
b0bd284033 Add ConvertUniformBufferToExternal to allow RDG UBs to be used in non-RDG contexts (e.g. RT pipeline)
#rb zach.bethel, ola.olsson
#preflight 63c7d0372a6acaf162f8a691

[CL 23753417 by wouter dek in ue5-main branch]
2023-01-18 06:10:35 -05:00
zach bethel
b852db62b9 Added RHI resource lifetime scopes which defer deletion of unreferenced resources until all scopes are closed.
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]
2023-01-16 19:13:49 -05:00
Kenzo Terelst
d2f1a92b2f Fixes to make ray tracing dynamic geometry and TLAS builds on async compute again
#jira UE-168252
#rb Luke.Thatcher, Zach.Bethel
#preflight 635a782ed86d91ca2c3ca925
#rnx

[CL 23625138 by Kenzo Terelst in ue5-main branch]
2023-01-10 06:28:18 -05:00
zach bethel
0d38710874 RDG AddSetupTask now returns the task and has an optional bCondition parameter to control whether the task is actually launched.
#jira none
#preflight 638f789dbb6fefa472bd3c6c

[CL 23411222 by zach bethel in ue5-main branch]
2022-12-06 12:34:01 -05:00
luke thatcher
854e9e8e16 Manual merge of 23164565 to resolve robomerge conflict. Original CL desc:
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]
2022-11-21 17:16:53 -05:00
christopher waters
6bcc020b6c Removing deprecated code from Renderer and RenderCore.
#jira none
#rb zach.bethel
#preflight 636e8639232e3d12cbb610f9

[CL 23104907 by christopher waters in ue5-main branch]
2022-11-11 16:10:25 -05:00
zach bethel
df1568434e Optimized RDG async compute fence computation.
#preflight 636d34ef1c14fe4505fdfc0e
#jira none

#ushell-cherrypick of 23068227 by zach.bethel

[CL 23101437 by zach bethel in ue5-main branch]
2022-11-11 13:21:11 -05:00
zach bethel
37fe71e0d1 Latency improvements to RDG.
- 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]
2022-11-08 04:25:52 -05:00
zach bethel
3b9b0f2d52 Resubmit of 22872901.
Added RDG_EVENT_SCOPE_FINAL variant that silences child scopes / events.
 - Added r.RDG.Events CVar to control GPU event behavior.
      - 0 disables GPU events; 1 enables GPU events and FINAL scopes suppress child scopes; 2 enables all GPU events.

#preflight 63614e16397c7af896701cae

[CL 22917968 by zach bethel in ue5-main branch]
2022-11-02 11:46:28 -04:00
nat parkinson
442a36cfd4 [Backout] - CL22872901 as it seems to have caused compile errors
[FYI] zach.bethel
Original CL Desc
-----------------------------------------------------------------
Added RDG_EVENT_SCOPE_FINAL variant that silences child scopes / events.
 - Added r.RDG.Events CVar to control GPU event behavior.
      - 0 disables GPU events; 1 enables GPU events and FINAL scopes suppress child scopes; 2 enables all GPU events.

#preflight 6360117d117bb4ce9da40ef0
#rb krzysztof.narkowicz, yuriy.odonnell, daniel.wright

[CL 22879513 by nat parkinson in ue5-main branch]
2022-11-01 07:02:14 -04:00
zach bethel
738376cef5 Added RDG_EVENT_SCOPE_FINAL variant that silences child scopes / events.
- Added r.RDG.Events CVar to control GPU event behavior.
      - 0 disables GPU events; 1 enables GPU events and FINAL scopes suppress child scopes; 2 enables all GPU events.

#preflight 6360117d117bb4ce9da40ef0
#rb krzysztof.narkowicz, yuriy.odonnell, daniel.wright

[CL 22876153 by zach bethel in ue5-main branch]
2022-10-31 20:56:49 -04:00
zach bethel
f7ae6fc7ef Fixed uniform buffer leak in Niagara due to parameters being allocated without destructor tracking.
#preflight 63370fa75c2225fe5f78a921
#rb Stu.McKenna
#jira UE-165232, UE-165233

[CL 22279764 by zach bethel in ue5-main branch]
2022-09-30 16:18:01 -04:00
luke thatcher
0c5c2b3e27 Merging //UE5/Dev-ParallelRendering (up to CL 22203289) to //UE5/Release-5.1
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]
2022-09-28 21:40:05 -04:00
zach bethel
f1e1522f88 Offload GPU scene uploads to an async task.
#preflight 6320e00e8838676d100595ed

[CL 21997767 by zach bethel in ue5-main branch]
2022-09-13 21:47:56 -04:00
zach bethel
487a34d598 Added parallel setup for RDG passes
- 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]
2022-08-30 17:48:59 -04:00
Bryan sefcik
b4a6e947d8 Ran IWYU on Public headers under Engine/Source/Runtime/...
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]
2022-07-20 11:31:36 -04:00
serge bernier
882beb5553 [Backout] - CL20968686
[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]
2022-07-09 07:04:47 -04:00