Commit Graph

56 Commits

Author SHA1 Message Date
zach bethel
3864629f00 Minor RDG improvements in preparation for UnifiedBuffer conversion.
- Added resource pool counters and events.
 - Added AllocatePooledBuffer method and refactored pool to no longer take a command list.
 - Refactored swap chain barrier logic to be a bit cleaner.
 - Added helper methods to cast between views.
 - Added power of two alignment option to buffer pool.
 - Added GetTypeHash implementations for RDG SRV | UAV descriptors.

#preflight 62631046006fa20b683d130f

[CL 19873407 by zach bethel in ue5-main branch]
2022-04-22 17:11:57 -04:00
zach bethel
f457a69101 Added RHI tracked access API to remove Unknown transitions.
- New RHI command list SetTrackedAccess method for the user to supply a current whole-resource state.
 - New RHI command context GetTrackedAccess method for querying the tracked access in RHIBeginTransitions / RHIEndTransitions on the RHI thread.
 - Hooked RHICmdList.Transition and FRHICommandListExecutor::Transition to assign tracked state automatically.
 - Refactored RDG and resource pools to use new RHI tracking.
      - FRDGPooledBuffer / FRDGPooledTexture no longer contain tracked state. RDG temp-allocates state through the graph allocator instead.
      - All prologue transitions are 'Unknown', and all epilogue transitions coalesce into a whole resource state.
 - Implemented platform support for patching the 'before' state with the tracked state.
 - Implemented various RHI validation checks:
      - Asserts that the user assigned tracked state matches RHI validation tracked state, for all subresources.
      - Asserts that tracked state is not assigned or queried from a parallel translation context.
 - Added FRHIViewableResource and FRHIView base classes to RHI. FRHIView contains a pointer to an FRHIViewableResource. This is currently a raw pointer, but should be extended to a full reference in a later CL.

NOTE on RHI thread constraint:

Transition evaluation is now restricted to the RHI thread (i.e. no parallel translation contexts). Transitions aren't performed in parallel translate contexts anyway, so this is not a problem. If, however, we decide to refactor parallel translation to be more general, this implementation could be extended to track the state per context and update from the 'dispatch' thread.

#preflight 6233b4396666d7e753a16aaf
#rb kenzo.terelst

[CL 19513316 by zach bethel in ue5-main branch]
2022-03-25 11:19:10 -04:00
Luke Thatcher
ee64a28f30 Copying //UE5/Dev-ParallelRendering to //UE5/Main
This change is the copy-up of work from //UE5/Dev-ParallelRendering to unify the various RHI texture types
 - The separate RHI texture types (FRHITexture2D, FRHITexture2DArray, FRHITexture3D, FRHITextureCube, FRHITextureCubeArray) have been replaced with a single type: FRHITexture.
 - Includes the required refactoring / fixes for the various platform RHIs.

The old texture types are still supported via typedefs, but will soon be marked deprecated. Future rendering code should make use of the FRHITexture type instead.

#jira UE-139559
#rb Mihnea.Balta
#preflight 622f3af819287beb2c3047f6
#robomerge[FN_ENGINEMERGE] DEV-NC

[CL 19371962 by Luke Thatcher in ue5-main branch]
2022-03-14 09:14:58 -04:00
zach bethel
9996233f7a Removed unused legacy MSAA multi-texture support from IPooledRenderTarget.
- Deprecated legacy members from FPooledRenderTargetDesc.
 - Deprecated ETextureRenderTarget and removed from RDG.
 - TargetableTexture always equals ShaderResourceTexture.
 - Simplified render target pool FindFreeElement.
 - Create pooled buffers and textures with a known state.

#rb graham.wihlidal
#preflight 61f8488568795b2f45852274

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 18796880 in //UE5/Release-5.0/... via CL 18797840 via CL 18799070
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18799188 by zach bethel in ue5-main branch]
2022-01-31 17:22:31 -05:00
zach bethel
25f20493c4 Backing out changes to remove unknown states in pooled resources. Unported code is still transitioning pooled resources while not updating the tracked state. This will result in incorrect before states.
#rb none
#preflight 61f1920ef8088a3d298fb3a9

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 18740193 in //UE5/Release-5.0/... via CL 18740756 via CL 18741541
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18742250 by zach bethel in ue5-main branch]
2022-01-26 15:04:14 -05:00
zach bethel
14085dec09 RDG now reuses tracked state for external pooled textures and buffers. Added a variant of RegisterExternal{Texture, Buffer} that allows the user to specify the actual state if transitioned outside of RDG.
#preflight 61e84c67276892ce107685a0
#rb kenzo.terelst

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 18662047 in //UE5/Release-5.0/... via CL 18662058 via CL 18662082
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18662103 by zach bethel in ue5-main branch]
2022-01-19 14:08:44 -05:00
zach bethel
2f790c0cc8 Removed r.RenderTargetPool.Events visualizer. It has been replaced by RDG insights.
#rb none
#preflight 61e6f8bb837b79f7cced82ee

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 18642485 in //UE5/Release-5.0/... via CL 18644124 via CL 18644421
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18644664 by zach bethel in ue5-main branch]
2022-01-18 14:18:07 -05:00
zach bethel
0143cb41fa Deprecated defunct legacy transient resource API and removed vestiges.
#preflight 61e0a87c250b9537f7837e74
#rb christopher.waters

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 18607884 in //UE5/Release-5.0/... via CL 18607913 via CL 18607948
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18607982 by zach bethel in ue5-main branch]
2022-01-13 17:56:22 -05:00
zach bethel
3b9e24d8b2 Replaced legacy XB1 transient page allocator with RDG page table mapped transient allocator. Added support for ESRAM page pool.
#rb ben.woodhouse
#preflight 61df2577ff67b6fe7ac00eae

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 18587728 in //UE5/Release-5.0/... via CL 18587798 via CL 18587831
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18587909 by zach bethel in ue5-main branch]
2022-01-12 14:29:07 -05:00
andrew davidson
0715ebc996 Type truncation fixes - Renderer
#rb arne.schober
#preflight 61d85ab0932a02483ce13e7d

#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18544411 in //UE5/Release-5.0/... via CL 18544434
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18544466 by andrew davidson in ue5-release-engine-test branch]
2022-01-07 10:39:08 -05:00
sebastien hillaire
3fa07b8184 Adding UAV view slice start index and size parameters to UAV creation.
RHIs interface update.
Not implemented on Switch, Mac and OpenGL yet.

Tested with Strata on pc dx11/dx12, xb1 base, ps4 and ps5.
Tested wihtout Strata on pc and ps4.
ShooterGame test on PC
Mac preflight https://horde.devtools.epicgames.com/job/61b268709947f1ef980c602e
#preflight test https://horde.devtools.epicgames.com/job/61b26827b13fefb344312f11

#rb RHI, Console

#ROBOMERGE-AUTHOR: sebastien.hillaire
#ROBOMERGE-SOURCE: CL 18508188 in //UE5/Release-5.0/... via CL 18508208
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18508217 by sebastien hillaire in ue5-release-engine-test branch]
2022-01-04 11:08:22 -05:00
ilya loshchinin
f743163687 Csv proviles: disable RenderTargetPool category on the server side by default.
#rb serge.bernier

#ROBOMERGE-AUTHOR: ilya.loshchinin
#ROBOMERGE-SOURCE: CL 18286697 via CL 18286714 via CL 18286727 via CL 18287855 via CL 18287924
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18287953 by ilya loshchinin in ue5-release-engine-test branch]
2021-11-24 15:42:47 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
aurel cordonnier
dc4bf61540 Merge from Release-Engine-Staging @ 17030559 to Release-Engine-Test
This represents UE4/Main @ 17030256 and Dev-PerfTest @ 17030553

[CL 17031509 by aurel cordonnier in ue5-release-engine-test branch]
2021-08-03 11:56:47 -04:00
jonathan bard
c27ab58ce8 Fixed transient texture array not properly created
#rb zach.bethel
#jira none
#preflight 60bf36897ed0b6000110a34a

[CL 16585964 by jonathan bard in ue5-main branch]
2021-06-08 08:12:51 -04:00
christopher waters
02fe0df0fd ETextureCreateFlags enum class.
#jira none
#rb luke.thatcher
#preflight 60abd0c758f02e00017a2196

[CL 16438084 by christopher waters in ue5-main branch]
2021-05-24 14:25:19 -04:00
Luke Thatcher
5419abad1c Fix crash in editor where the format aliasing overload of RHICreateUnorderedAccessView is not implemented.
- We shouldn't call this function when GRHISupportsUAVFormatAliasing is false

#rb Zach.Bethel

[CL 16376850 by Luke Thatcher in ue5-main branch]
2021-05-18 17:39:24 -04:00
Luke Thatcher
d9728437c1 Add UAVFormat field to FPooledRenderTargetDesc to allow selection of an aliasing format when retrieving surfaces from the pool
- Used by the VT system to alias DXT surfaces with integer formats.

#rb Zach.Bethel
#fyi Christopher.Waters
#jira UE-114726
#preflight 60a3aca422cce000018d88ad

[CL 16369514 by Luke Thatcher in ue5-main branch]
2021-05-18 12:34:02 -04:00
christopher waters
d1f02225a4 Adding support for R32_FLOAT depth buffers.
#jira UE-85382
#rb brian.white, will.damon, mihnea.balta
#fyi andrew.lauritzen
#preflight 609de73fbfbee500013afd47

[CL 16330130 by christopher waters in ue5-main branch]
2021-05-14 11:17:41 -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
953d21cec8 Transient allocator support for platform
#lockdown nick.whiting


#ROBOMERGE-SOURCE: CL 16106012 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v789-15992632)

[CL 16106022 by zach bethel in ue5-main branch]
2021-04-23 15:48:49 -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
kenzo terelst
1c0b2807e5 Fix issue where frame fence is retrieved from RenderThread while it's being updated by RHI Thread while deleting resources from the RenderThread (should be moved to RHIThread via request deletion)
#jira none
#rb trivial

#ROBOMERGE-SOURCE: CL 15750288 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v781-15675533)

[CL 15753928 by kenzo terelst in ue5-main branch]
2021-03-20 04:30:17 -04:00
zach bethel
5c7467a9c5 Fix for crash in render target pool texture trimming.
#fyi kenzo.terelst, michal.valient
#jira FROST-1427

[CL 15742513 by zach bethel in ue5-main branch]
2021-03-18 18:52:49 -04:00
Marc Audy
0cbbc781ca Merge UE5/Release-Engine-Staging @ 15740152 to UE5/Main
This represents UE4/Main @ 15709114

[CL 15740605 by Marc Audy in ue5-main branch]
2021-03-18 15:20:03 -04:00