- 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]
- 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]
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]
- 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]
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]
- 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]
- 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]