Commit Graph

159 Commits

Author SHA1 Message Date
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
zach bethel
0f1d926f3f Fix for crash in RDG when async compute is enabled. Raster pass resources were being initialized after later async compute passes, causing a mismatch in resource creation. This change moves render pass merging to happen before async compute fencing, since they are otherwise independent operations.
#fyi graham.wihlidal, yuriy.odonnell

[CL 15836462 by zach bethel in ue5-main branch]
2021-03-25 20:08:40 -04:00
Yuriy ODonnell
e022bafd5d Groundwork for managing ray tracing resources in RDG.
- Added BVHRead to ERHIAccess::ReadOnlyExclusiveMask BVHRead
- Added FRDGBufferDesc::EUnderlyingType::AccelerationStructure
- Added acceleration structure handling in EnumerateBufferAccess, FindFreeBufferInternal, GetOrCreateSRV, FRDGBufferSRVDesc

#fyi zach.bethel

[CL 15820134 by Yuriy ODonnell in ue5-main branch]
2021-03-25 06:36:58 -04:00
Kenzo Terelst
9a79537bd4 Buffers need UAV flag set to be transient - otherwise it could be upload resource
#jira none
#rb Zach.Bethel

[CL 15818173 by Kenzo Terelst in ue5-main branch]
2021-03-25 04:17:03 -04:00
zach bethel
701f331905 Fix for RDG using MemStack allocator.
#rb rolando.caloca
#rnx

#ROBOMERGE-SOURCE: CL 15786953 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v783-15756269)

[CL 15790761 by zach bethel in ue5-main branch]
2021-03-23 22:42:59 -04:00
zach bethel
7153d26a37 Fixed profilegpu missing RDG passes.
#fyi guillaume.abadie

[CL 15764784 by zach bethel in ue5-main branch]
2021-03-22 12:51:37 -04:00
zach bethel
3d2a5ac6e5 Fixed race with profile gpu and draw events in RDG.
#jira UE-110474
#rb none
#robomerge Release-5.0-EarlyAccess

[CL 15741526 by zach bethel in ue5-main branch]
2021-03-18 16:54:06 -04:00
zach bethel
8c1793ad5a Integration of RHI transient allocator into RDG.
- Replaced legacy transient support from RDG and replaced with new API.
 - Reworked acquire / discard operations a bit and added RHI validation to track correctness.
 - Reworked RDG barrier batching to include acquire / discard operations.
 - Hardened render pass merging logic and expanded to support lifetime extension of transient resources.
 - Added transient tag to RDG insights to track which resources are transient.

#rb luke.thatcher, kenzo.terelst

[CL 15726534 by zach bethel in ue5-main branch]
2021-03-17 12:44:59 -04:00
Marc Audy
8f73cd7fa9 Merge UE5/Release-Engine-Staging @ 15630841 to UE5/Main
This represents UE4/Main @ 15601601

[CL 15631170 by Marc Audy in ue5-main branch]
2021-03-05 19:27:14 -04:00
steve smith
461f10df8e Fix CIS break (with rename of FoveationTexture to ShadingRateTexture).
#rb trivial
#jira none

[CL 15630421 by steve smith in ue5-main branch]
2021-03-05 18:33:15 -04:00
steve smith
3b48a577cd Add missing fix for foveation texture
#jira UE-104918
#rb zach.bethel

#ROBOMERGE-SOURCE: CL 15628920 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v777-15581079)

[CL 15628924 by steve smith in ue5-main branch]
2021-03-05 16:28:51 -04:00
steve smith
f6669c1638 Fix assert on RHI access for foveation texture.
#jira UE-104918
#rb zach.bethel

#ROBOMERGE-SOURCE: CL 15628768 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v777-15581079)

[CL 15628769 by steve smith in ue5-main branch]
2021-03-05 16:16:14 -04:00
zach bethel
b544f9a0a6 Fixed bad merge of 4.26 transient resource fixes in RDG.
#rnx
#rb none

[CL 15566509 by zach bethel in ue5-main branch]
2021-03-02 00:38:03 -04:00
Luke Thatcher
187779ebf9 Fix bugs in RHI validation layer
- Stencil SRVs didn't have their plane index set appropriately, causing SRVGraphics/SRVCompute access to be logged against the depth plane instead, resulting in spurious validation errors.
 - Filter for unique resources in RDG's handling of Begin/EndUAVOverlap. The tracking for overlaps is kept on the underlying resource, not the view, meaning if two views to the same resource are passed to Begin/EndUAVOverlap, it will trigger the Begin/End mismatch validation.

Add support for enabling RHI validation logging on the command line
 - Use -RHIValidationLog=" ... resource names ... ", where the list of names are comma separated.
 - Replaces the hardcoded GAutoLogResourceNames array in RHIValidation.cpp.

Minor change: switch ordering of args in SpecificUAVOverlap to match the other state validation functions.

#rb Christopher.Waters

[CL 15522344 by Luke Thatcher in ue5-main branch]
2021-02-24 18:07:36 -04:00
zach bethel
af9ebacf59 Reimplemented fix for transient resources in RDG.
#rnx

[CL 15474055 by zach bethel in ue5-main branch]
2021-02-19 14:33:45 -04:00