- 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]
Adding templated GetDynamicRHI that makes sure we don't cast the Validation DynamicRHI by accident.
#jira none
#rb jeannoe.morissette, zach.bethel
#preflight 62169c43104496cff8a1d9df
[CL 19100864 by christopher waters in ue5-main branch]
- Deprecating IRHIComputeContext::RHISetComputeShader.
- Moving the fallback version of RHISetComputePipelineState to IRHICommandContextPSOFallback.
- Making IRHIComputeContext::RHISetComputePipelineState pure virtual.
- Moving the fallback versions of RHICreateGraphicsPipelineState and RHICreateComputePipelineState into the new FDynamicRHIPSOFallback for platforms that were already using IRHICommandContextPSOFallback.
- Making FDynamicRHI::RHICreateGraphicsPipelineState and FDynamicRHI::RHICreateComputePipelineState pure virtual.
#jira none
#rb luke.thatcher, florin.pascu, will.damon, jeannoe.morissette
#preflight 621660bcc152c67496d9cc75
[CL 19095306 by christopher waters 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]
This should fully address UniformBufferLayout/UniformBuffer crashes that randomly happen during shader compiling in the Editor.
#jira none
#rb arciel.rekman, ben.ingram, mihnea.balta, stu.mckenna, will.damon
#preflight 611eb6c6008be90001f8b031
#ROBOMERGE-SOURCE: CL 17243608 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)
[CL 17243630 by christopher waters in ue5-release-engine-test branch]
- 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]
- FRHITextureReference is now implemented entirely within the base RHI module, and platform specific code from each RHI has been removed.
- This also unifies how each platform deals with nullptr texture references. Some used GWhiteTexture, others used GBlackTexture, others probably just crash. Now, nullptr references will refer to GBlackTexture.
- New implementation also handles RHI validation properly. Old code would crash when a nullptr reference is used in a draw.
#rb Kenzo.TerElst, Will.Damon
#jira none
[CL 15586248 by Luke Thatcher in ue5-main branch]
Turn CreateAndLock*() functions into utility functions and remove all superfluous RHI implementations that only did Create+Lock anyway.
#rb kenzo.terelst, will.damon
[CL 15128492 by Emil Persson in ue5-main branch]
#jira MTHRL-41
#rb david.harvey
#ROBOMERGE-SOURCE: CL 12985283 in //UE4/Release-4.25Plus/... via CL 12985286
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)
[CL 12985291 by john white in Main branch]