Commit Graph

178 Commits

Author SHA1 Message Date
zach bethel
447ab7a28a Fixed bug with RDG drain and async compute. Fixed transition bug with UAV workaround in upload buffers. Added some command line arguments. Optimiized checks to disable RDG validation if parallel.
#rb none

#ROBOMERGE-SOURCE: CL 16997303 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16997322 by zach bethel in ue5-release-engine-test branch]
2021-07-29 13:02:16 -04:00
zach bethel
a6c2b7ea30 Fixed state merging when r.RDG.Drain is enabled.
#rb trivial

#ROBOMERGE-SOURCE: CL 16962979 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16962993 by zach bethel in ue5-release-engine-test branch]
2021-07-26 19:49:38 -04:00
zach bethel
2f133f4f37 Fixed GPU scene and Nanite resources to support cross-pipeline SRV access.
Re-enabled async compute for Nanite. Fixed submission bug with async compute and parallel RDG where the async compute command list wasn't being submitted correctly in order.

#rb jamie.hayes, luke.thatcher
[FYI] graham.wihlidal
#jira UE-114775

#ROBOMERGE-SOURCE: CL 16937065 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16937073 by zach bethel in ue5-release-engine-test branch]
2021-07-23 10:18:32 -04:00
jian ru
95a7717441 Conditional GPU copies for RDG buffer uploads. This fixes broken GPU captures on some platforms when CPU-initialized GPU-modified buffers are used
#jira UE-118792

#ROBOMERGE-SOURCE: CL 16933927 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16933931 by jian ru in ue5-release-engine-test branch]
2021-07-22 22:31:13 -04:00
zach bethel
89fc4cf833 Parallel RDG execution improvements.
- Added ERDGBuilderFlags::AllowParallelExecute to tag specific builders to attempt parallel execution. This avoids cases where small graphs fork tasks and end up causing contention. Only the main scene render graphs are tagged.
 - Moved RHI transition creation to an async task.
 - Moved parallel execute setup and dispatch to an async task.
 - Fixed RDG draining asserts using a short-term workaround by tagging relevant scene textures as non-transient.
 - Deprecated RDG AddPass utilities without names and fixed up last remnants.
 - Enabled parallel RDG execution by default.

[FYI] christopher.waters

#ROBOMERGE-SOURCE: CL 16925941 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16925957 by zach bethel in ue5-release-engine-test branch]
2021-07-22 12:43:00 -04:00
zach bethel
d03ba8eaba Remove split transition for swap chain textures. This avoids cases where certain platforms will stall at the beginning of graph execution.
#rb christopher.waters
#jira UE-119087

#ROBOMERGE-SOURCE: CL 16850825 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16850829 by zach bethel in ue5-release-engine-test branch]
2021-07-14 11:51:24 -04:00
zach bethel
5ec769f91e RDG Parallel Execution (disabled by default)
- Refactored RDG to support free-threaded execution of passes.
 - Refactored renderer to use specific RHI command list variants in pass lambda. Immediate command list passes are forced to stay on the render thread, while other variants can be parallelized.

#rb christopher.waters

#ROBOMERGE-SOURCE: CL 16838717 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16838724 by zach bethel in ue5-release-engine-test branch]
2021-07-13 12:38:37 -04:00
christopher waters
b78f574b8a RDGBuffer objects actually need destructing with their new TFunction members. This fixes a slow leak when using Buffer creation callbacks.
#jira none
#rb jian.ru, zach.bethel
#preflight 60d617e1caf05900010655a8

#ROBOMERGE-SOURCE: CL 16787641 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16787653 by christopher waters in ue5-release-engine-test branch]
2021-06-25 15:34:35 -04:00
ola olsson
30b717b963 Combing GPU-Scene instance culling and the id-list generation into one step, and the same for VSM
- Uses the InstanceCullingLoadBalancer to pre-distribute the work on the CPU to ensure even load.
 - Make instance culling use the instance data offset in MDC instead of translating primitive IDs.
 - Track single-instance draws separately from instanced to optimize handling (disable culling for single-instance primitives).

#rb Graham.wihlidal,andrew.lauritzen
[FYI] dmitriy.dyomin
#preflight 60d0eafa2ab2180001269160

#ROBOMERGE-SOURCE: CL 16733827 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16733837 by ola olsson in ue5-release-engine-test branch]
2021-06-21 16:52:03 -04:00
jian ru
55aeb4e4a6 XB1 transient allocator implementation that works with RDG. Courtesy to Kenzo for most of the implementation
#jira UE-117189
#rb ben.woodhouse, kenzo.terelst
[FYI] ben.woodhouse, kenzo.terelst, zach.bethel

#ROBOMERGE-SOURCE: CL 16682921 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16682930 by jian ru in ue5-release-engine-test branch]
2021-06-15 20:56:21 -04:00
Jian Ru
13d2d6e79e Batch BuildRenderingCommands from major mesh passes inside the main render function
#jira UE-117281
#rb ola.olsson, zach.bethel

[CL 16572282 by Jian Ru in ue5-main branch]
2021-06-07 12:19:06 -04:00
zach bethel
f30bf425f3 Fix for assert when readback resource is being used in a copy destination state.
#rb none

[CL 16523954 by zach bethel in ue5-main branch]
2021-06-01 17:52:32 -04:00
zach bethel
db4d19f641 Fix for culled RDG uniform buffer being created.
#rb andrew.lauritzen

[CL 16523561 by zach bethel in ue5-main branch]
2021-06-01 17:25:18 -04:00
zach bethel
2ab8c34577 Replaced FRDGBufferUploader with internal RDG upload. Removes several transitions and passes and removes immediate command list passes from the graph.
#rb jian.ru

[CL 16459303 by zach bethel in ue5-main branch]
2021-05-25 20:46:17 -04:00
zach bethel
b843dabf06 Minor RDG fixes and support for read-only system textures.
[CL 16456650 by zach bethel in ue5-main branch]
2021-05-25 17:11:34 -04:00
kenzo terelst
17719fe54c Force IndirectArg buffers to not use transient allocator and make them committed resources in d3d12
#jira UE-115982
#rb Yuriy.ODonnell, Graham.Wihlidal

#ROBOMERGE-OWNER: kenzo.terelst
#ROBOMERGE-AUTHOR: kenzo.terelst
#ROBOMERGE-SOURCE: CL 16425509 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v811-16416015)
#ROBOMERGE-CONFLICT from-shelf

[CL 16425600 by kenzo terelst in ue5-main branch]
2021-05-21 17:42:34 -04:00
zach bethel
90bc2efada RDG refactor to enable draining of work after issuing occlusion queries.
- New Drain() method on FRDGBuilder; will flush all pending work.
 - Drained passes are not culled; resource lifetimes are extended; async compute fences are optimized as best as possible but fence joining may occur after the drain.
 - Batch up and pre-build all resource transitions. This is a prerequisite for parallel command lists.
 - Removed ServiceLocalQueue passes with built-in RDG AddDispatchHint().

#jira UE-114622

[CL 16393495 by zach bethel in ue5-main branch]
2021-05-19 17:54:58 -04:00
zach bethel
8d8b93086a Reworked RDG pooled buffer size alignment so that it no longer affects the external-facing descriptor.
#rb none
#jira FROST-2514
#fyi charles.derousiers

[CL 16222555 by zach bethel in ue5-main branch]
2021-05-06 12:36:40 -04:00
zach bethel
804d775535 Minor RDG optimizations.
- Simplified texture subresource tracking.
 - Removed map lookup for each resource in SetupPass.
 - Improved Compile / CollectPassResources to reduce cache misses.
 - Added some container reservations to reduce reallocation costs.
 - Added snapping of buffers to page boundaries to improve re-use.

#rb none

[CL 16208311 by zach bethel in ue5-main branch]
2021-05-05 11:58:15 -04:00
Jian Ru
e4b1ea48eb Join the last async compute pass to its first consumer pass instead of the graph epilogue
#rb zach.bethel

[CL 16118371 by Jian Ru in ue5-main branch]
2021-04-26 16:29:05 -04:00
zach bethel
b67b0d2dda Added FRHI{Texture, Buffer}ViewCache to clean up FRDGPooledX / FRHITransientX duplicate code. Added support for UAVs with a format.
#rb christopher.waters
#preflight 6086ee7c1046fb00018cec87

[CL 16116698 by zach bethel in ue5-main branch]
2021-04-26 14:12:08 -04:00
zach bethel
47cf1f4458 Rewrite of RHI transient resource system.
- Views are cached on RHI transient resources; view renames are no longer necessary.
 - RHI Transient resources utilize a single cache per heap keyed off of the descriptor + offset. Resource caches and heaps are garbage collected.
 - CPU performance is effectively equivalent to the existing pooled resource method.
 - Added common RHI transient resource allocator implementation in RHI core; significantly reduces the amount of platform code.
 - Resource aliasing overlaps are tracked by the RHI and submitted through an acquire operation.
 - Fixed D3D12 implementation to support multi-GPU.
 - Removed condition that excluded small (<64k) buffers in the transient allocator.
 - RHI validation now checks that resource overlaps are valid; i.e. if an overlap occurs between resource A and B during an acquire of B, validation checks that A has been discarded.

#rb graham.wihlidal, luke.thatcher, kenzo.terelst

[CL 16076280 by zach bethel in ue5-main branch]
2021-04-21 13:03:28 -04:00
wei liu
fd8ea2fa94 Support a pass with the ability to explicitly skip pass merging.
#jira 113084

#rb Zach.Bethel, Dmitriy.Dyomin, Jack.Porter, Mi.Wang

#lockdown ben.marsh

#ROBOMERGE-SOURCE: CL 15966669 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v787-15839533)

[CL 15981946 by wei liu in ue5-main branch]
2021-04-12 15:36:14 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
zach bethel
583f3b7ce1 Allow extracted resources to be re-used within the same graph if the reference is no longer externally held. Allows overlap of shadow HZB, saving 45MB.
#rb trivial
#lockdown michal.valient

#ROBOMERGE-SOURCE: CL 15951972 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v787-15839533)

[CL 15951980 by zach bethel in ue5-main branch]
2021-04-08 00:39:34 -04:00