Commit Graph

70 Commits

Author SHA1 Message Date
christopher waters
1f21b73b25 Ran IWYU on RHI and RenderCore, private only.
#preflight 63d358c85c69f453c1f79c37

[CL 23889591 by christopher waters in ue5-main branch]
2023-01-27 14:54:10 -05:00
aleksander netzel
5520c657a5 Support for Lumen HWRT Async Compute when using inline ray tracing:
* Move LumenHardwareRayTracingHitDataBuffer to RDG (changed RDG validation to be less restrictive)
* Propagate ComputePassFlags to all HWRT passes
* Remove direct dispatch path in Lumen HWRT passes because IndirectDispatch is always supported.
* When Lumen HWRT is running async we need to run WaitForRayTracingScene earlier
* Controlled by r.Lumen.HardwareRayTracing.AsyncCompute. Disabled by default.

#rb krzysztof.narkowicz
#jira UE-172179
#preflight 63cf9da5574ab9cae4f19ce4

[CL 23828667 by aleksander netzel in ue5-main branch]
2023-01-24 07:02:08 -05:00
wouter dek
b0bd284033 Add ConvertUniformBufferToExternal to allow RDG UBs to be used in non-RDG contexts (e.g. RT pipeline)
#rb zach.bethel, ola.olsson
#preflight 63c7d0372a6acaf162f8a691

[CL 23753417 by wouter dek in ue5-main branch]
2023-01-18 06:10:35 -05:00
zach bethel
487a34d598 Added parallel setup for RDG passes
- Passes are added to a queue that is consumed by a task to perform pass setup actions.
 - Moved CompilePassBarriers to overlap with resource collection.
 - Converted most tasks to new task system.

#preflight 630e5e2e660db81edb9a0562

[CL 21710710 by zach bethel in ue5-main branch]
2022-08-30 17:48:59 -04:00
zach bethel
fdc795f5b9 Implemented support for fused CopySrc | CopyDest transitions for Vulkan in RDG.
- Simplified RDG transition logic to only use subresource transitions.
 - Don't allow unmergeable states to be merged during pass setup.

#preflight 627ebfadca3b90fc14fb9b85
#fyi jeannoe.morissette

[CL 20224647 by zach bethel in ue5-main branch]
2022-05-16 11:02:52 -04:00
zach bethel
1a6dbc061d Deprecated FRDGBufferDesc::EUnderlyingType
#preflight 62756de8d8373707f22a6144
#rb christopher.waters

[CL 20082899 by zach bethel in ue5-main branch]
2022-05-06 15:44:23 -04:00
guillaume abadie
3c50a8937d Added support for per-slice texture array UAV+SRV on some platforms
#rb luke.thatcher, zach.bethel, will.damon
[FYI] richard.wallis, mihnea.balta
#preflight 6261a519d929bc34a3ed5699, 6270c4cc006bd3ab9e83eb1d

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 20023299 via CL 20023301 via CL 20023302
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20023804 by guillaume abadie in ue5-main branch]
2022-05-03 08:29:15 -04:00
zach bethel
4eedc02f37 Fixes to external access RDG feature to handle async compute without validation failures.
#preflight 6270551191629533ec2b4bc9

[CL 20017395 by zach bethel in ue5-main branch]
2022-05-02 18:31:37 -04:00
zach bethel
10131e1285 Refactored RDG in preparation for UnifiedBuffer conversions.
- Refactord 'Finalized Access' feature into a more flexible 'External' vs. 'Internal' access mode per resource toggle.
      - Resources can transition between modes multiple times within the graph.
      - Supports async compute pipeline.
      - Supports queueing of requests to avoid back-to-back helper passes.
      - This feature is needed to support conversion of GPU scene buffers.

 - Deprecated the ReadOnly and ForceTracking resource flags and added a 'SkipTracking' flag instead.
      - Previous semantics were confusing and error prone.
      - New model requires a manual flag to tell RDG never to transition a resource.
      - This flag is used for read-only dummy resources as an optimization.

 - Renamed some of the auxiliary 'FinalizedResource' utilities since the name no longer matches the semantics.

#preflight 6266cc6d0634d0904ce4ba46

[CL 19904734 by zach bethel in ue5-main branch]
2022-04-25 13:00:12 -04:00
zach bethel
373e1c32e7 Don't clobber RDG resources that were uploaded from host memory.
#jira UE-143179
#fyi charles.derousiers
#preflight trivial

[CL 19557943 by zach bethel in ue5-main branch]
2022-03-30 11:30:02 -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
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
46dc28d1bd Fix for loop variable being copied warning.
#jira UE-138723
#rb trivial
#preflight trivial

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

[CL 18621834 by zach bethel in ue5-main branch]
2022-01-14 14:33:23 -05:00
jonathan bard
79f32ed47c Misc render-related changes:
* Added single-callback version of CreateStructuredBuffer to automatically infer element size, total size, element count and data pointer (e.g. CreateStructuredBuffer(GraphBuilder, TEXT("MyBuffer"), [&]() -> auto& { return BufferSource; });, where BufferSource is a TArray)
* Added support for uint2 shader parameters
* Added ForceTracking flag to ERDGBufferFlags/ERDGTextureFlags : force the RDG to track a resource even if it can be considered as readonly (no UAV, no RTV, etc.) This allows the graph to copy from and to external textures, and handling the corresponding transitions, for example.

#rb zach.bethel, sebastien.lussier
#tests editor
#preflight 61d8bc681f62d3ad4d728095

#ROBOMERGE-OWNER: jonathan.bard
#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 18595021 via CL 18595031 via CL 18595035 via CL 18595668 via CL 18595682 via CL 18595700
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18596726 by jonathan bard in ue5-main branch]
2022-01-13 10:11:22 -05:00
guillaume abadie
2ac6433b4c Implements FRHITextureCreateInfo::Validate() to also validate maximum dimension sizes
#rb zach.bethel
#preflight 61d30944df783d9d868ce26d

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 18506609 in //UE5/Release-5.0/... via CL 18506610 via CL 18506611
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18506612 by guillaume abadie in ue5-main branch]
2022-01-04 04:44:06 -05:00
guillaume abadie
cbe1cadf94 Implements FRHITextureCreateInfo::Validate() to also validate maximum dimension sizes
#rb zach.bethel
#preflight 61d30944df783d9d868ce26d

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 18506609 in //UE5/Release-5.0/... via CL 18506610
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18506611 by guillaume abadie in ue5-release-engine-test branch]
2022-01-04 04:43:28 -05:00
zach bethel
a23f0c81d4 Major refactor of transient allocator to support page table mapping implementation and extracted transient resources.
- Implemented common transient page allocator in RHICore.
 - Implemented XBox specific GPU page table mapping allocator.
 - Extended RDG insights to support viewing heap visualization or page pool visualization.

#preflight 61d356682e0e436c725818bf

[CL 18504626 by zach bethel in ue5-main branch]
2022-01-03 18:28:16 -05:00
charles derousiers
e17a01e51a Add RDG Upload variant which take a lambda function for freeing the CPU memory once the data are uploaded.
#rb zach.bethel
#preflight 612f0d3779d62b0001b43362

#ROBOMERGE-SOURCE: CL 17383153 via CL 17383415
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17383421 by charles derousiers in ue5-release-engine-test branch]
2021-09-01 03:09:25 -04:00
charles derousiers
810cb7dac2 Add RDG Upload variant which take a lambda function for freeing the CPU memory once the data are uploaded.
#rb zach.bethel
#preflight 612f0d3779d62b0001b43362


#ROBOMERGE-SOURCE: CL 17383153
#ROBOMERGE-BOT: (v865-17346139)

[CL 17383415 by charles derousiers in ue5-main branch]
2021-09-01 03:08:48 -04:00
zach bethel
5238135bde Fixed RDG debug crash.
#rb trivial
#jira UE-118756

#ROBOMERGE-SOURCE: CL 17322944 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17322985 by zach bethel in ue5-release-engine-test branch]
2021-08-26 14:06:40 -04:00
zach bethel
49f0d28560 Fixed RDG debug crash.
#rb trivial
#jira UE-118756

[CL 17322944 by zach bethel in ue5-main branch]
2021-08-26 14:04:36 -04:00
zach bethel
447ab7a28a Fixed bug with RDG drain and async compute. Fixed transition bug with UAV workaround in upload buffers. Added some command line arguments. Optimiized checks to disable RDG validation if parallel.
#rb none

#ROBOMERGE-SOURCE: CL 16997303 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16997322 by zach bethel in ue5-release-engine-test branch]
2021-07-29 13:02:16 -04:00
zach bethel
ad2a2a8cdb Fixed bug with RDG drain and async compute. Fixed transition bug with UAV workaround in upload buffers. Added some command line arguments. Optimiized checks to disable RDG validation if parallel.
#rb none

[CL 16997303 by zach bethel in ue5-main branch]
2021-07-29 13:00:55 -04:00
kenzo terelst
b02561aa19 Don't allow creation of presentable textures through RDG
#jira UE-120376
#rb Zach.Bethel
#preflight 61001fce1450a600013ee0a5

#ROBOMERGE-SOURCE: CL 16969211 via CL 16972156
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16972370 by kenzo terelst in ue5-release-engine-test branch]
2021-07-27 15:35:11 -04:00
kenzo terelst
aa2fbd1b71 Don't allow creation of presentable textures through RDG
#jira UE-120376
#rb Zach.Bethel
#preflight 61001fce1450a600013ee0a5


#ROBOMERGE-SOURCE: CL 16969211
#ROBOMERGE-BOT: (v838-16927207)

[CL 16972156 by kenzo terelst in ue5-main branch]
2021-07-27 15:27:05 -04:00