Commit Graph

173 Commits

Author SHA1 Message Date
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
zach bethel
d663ad3b00 Fixed RDG builder to propagate transient Discard flag to RHI.
[FYI] kenzo.terelst
#lockdown michal.valient
#rnx

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

[CL 15932170 by zach bethel in ue5-main branch]
2021-04-06 13:11:13 -04:00
zach bethel
9fc8b1722d Refactored RDG ConvertToUntrackedX functionality into the RDG builder; renamed the operation to 'FinalizeAccess' for clarity, as the resource is considered finalized in the graph and will not transition to any other state. This operation now supports multiple resources, improving performance in cases where multiple resources are finalized back-to-back. Added validation to check that the user don't attempt to use it outside of its finalized state. Fixed up a few places where this assumption was being violated. Minor refactors in various places to use new API.
#rb arne.schober, christopher.waters
#jira none

[CL 15931331 by zach bethel in ue5-main branch]
2021-04-06 11:45:09 -04:00
zach bethel
7ab2877ef0 Fix for N-to-N pipe transition check in RDG.
#rb trivial
#jira UE-112571

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

[CL 15912962 by zach bethel in ue5-main branch]
2021-04-04 21:16:04 -04:00
marc audy
bf2e06bca2 Added initial support for RDG_{TEXTURE, BUFFER}_ACCESS_ARRAY, which enables a dynamic number of inputs into an RDG pass. Removed unused / deprecated SHADER_PARAMETER_RDG_BUFFER.
#rb none

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 15905815 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)
#ROBOMERGE-CONFLICT from-shelf

[CL 15907353 by marc audy in ue5-main branch]
2021-04-02 20:35:50 -04:00
zach bethel
f2d4135093 Fix for race in RHI validation due to transient allocator re-initializing barrier tracking on the render thread.
#rb kenzo.terelst, luke.thatcher
#jira none

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

[CL 15854607 by zach bethel in ue5-main branch]
2021-03-29 15:54:31 -04:00