Commit Graph

232 Commits

Author SHA1 Message Date
zach bethel
b1b031829f Fix for ensure when using RDG clobber resources.
#jira UE-156315
#preflight trivial

[CL 21924352 by zach bethel in ue5-main branch]
2022-09-09 13:51:29 -04:00
zach bethel
ebbe30f548 Removed RDG pass CPU trace to reduce memory pressure on insights.
#fyi Ionut.Matasaru
#preflight trivial

[CL 21854680 by zach bethel in ue5-main branch]
2022-09-07 13:05:54 -04: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
f4bc813400 Disable full string events in RDG in test builds, even when profile gpu is enabled, and disable per-pass tracing as well.
[CL 21696542 by zach bethel in ue5-main branch]
2022-08-30 02:23:50 -04:00
zach bethel
8eac902180 Fixed parallel translate latency. With lock / unlock supported in queued async command lists, an RHI thread fence was being added conservatively with every async command list submission. When RDG parallel execution is enabled, the parallel translate jobs cannot launch until they are supposed to be submitted, which introduces massive stalls on the RHI thread and extends parallel translation into the next frame, clashing with InitViews. This change fixes the issue by introducing a tiny job that launches when all dependent command lists are finished recording (which happens quickly in RDG) and then scans for the latest RHI thread fence on any of the command lists.
#rb ben.woodhouse, christopher.waters

[CL 21499911 by zach bethel in ue5-main branch]
2022-08-22 21:21:08 -04:00
serge bernier
882beb5553 [Backout] - CL20968686
[FYI] zach.bethel
Original CL Desc
-----------------------------------------------------------------
Move RDG buffer uploads off the render thread.

Maybe be related to gpu crash in EMT (UE-157850)

#preflight 62b9f1ec4209c7c579df8fc2

#ushell-cherrypick of 20839110 by zach.bethel

#ROBOMERGE-OWNER: ben.woodhouse
#ROBOMERGE-AUTHOR: serge.bernier
#ROBOMERGE-COMMAND: _robomerge ue5-main
#ROBOMERGE-SOURCE: CL 21010071 via CL 21010165 via CL 21010189
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21020108 by serge bernier in ue5-main branch]
2022-07-09 07:04:47 -04:00
serge bernier
63ff734598 Move the execute of the RDG GPU scopes before the Prologue to include the BeginRenderPass. This will make clears done in the BeginRenderPass appear in there corresponding render pass and not in the previous one. Also changed the order of the markers execute for the Epilogue for consistency.
#rb [at]zachary.bethel

#ROBOMERGE-OWNER: serge.bernier
#ROBOMERGE-AUTHOR: serge.bernier
#ROBOMERGE-SOURCE: CL 20987740 via CL 20988066 via CL 20988088
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 20991417 by serge bernier in ue5-main branch]
2022-07-07 16:03:43 -04:00
zach bethel
a604eb2cf9 Fixed async RDG clear to delete allocator after the FRDGBuilder destructor executes.
#preflight 62c362e57358826af82295d0

[CL 20937688 by zach bethel in ue5-main branch]
2022-07-04 18:20:07 -04:00
ben woodhouse
2d39d994c3 Put RDG::ExecutePass into its own RDG_Execute CSV stat to make it easier to measure (instead of using RenderOther)
[FYI] zachary.bethel

#ROBOMERGE-AUTHOR: ben.woodhouse
#ROBOMERGE-SOURCE: CL 20930230 via CL 20930231 via CL 20930232
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20931176 by ben woodhouse in ue5-main branch]
2022-07-03 22:00:23 -04:00
zach bethel
06fbb3a3e1 Moved RDG builder destruction off the render thread.
#preflight 62bf7a3cc438da7f09eb21d5

[CL 20926623 by zach bethel in ue5-main branch]
2022-07-02 12:20:33 -04:00
zach bethel
34623f0321 Replaced thread-local MemStack with ConcurrentLinearAllocator across the renderer.
- Removed scene render mem-mark among others. MemStack usage is now restricted to local scopes with known marks.
 - Render resources with destructors are allocated using the FSceneRenderingBulkObjectAllocator on FSceneRenderer, which is deleted when the scene render is.

#preflight 62b266e20d4d6228de97babe
#rb mihnea.balta, yuriy.odonnell

[CL 20907647 by zach bethel in ue5-main branch]
2022-06-30 19:55:24 -04:00
zach bethel
ddea412b12 Move RDG buffer uploads off the render thread.
#preflight 62b9f1ec4209c7c579df8fc2

[CL 20839110 by zach bethel in ue5-main branch]
2022-06-27 16:45:50 -04:00
zach bethel
f04a19a658 Fixed RHI validation error in cloud rendering.
#preflight 62b37fcac603be614811adcd
#jira UE-156470

[CL 20784050 by zach bethel in ue5-main branch]
2022-06-22 18:47:11 -04:00
zach bethel
8a9fd982e6 Sync RDG setup events prior to the PSO cache coalescing sync point.
#fyi dave.barrett
#preflight 62a95ee1293ff41d4957783a

[CL 20665487 by zach bethel in ue5-main branch]
2022-06-15 00:28:49 -04:00
zach bethel
eee5dbab99 Fix for engine test failure in DumpGPU on Vulkan
#preflight 62a60279b94c57409e81884f

[CL 20619061 by zach bethel in ue5-main branch]
2022-06-12 11:28:44 -04:00
mihnea balta
b6bd0ea0ac Add missing task tag when FRDGBuilder::CreateUniformBuffers runs async.
#fyi Zach.Bethel
#preflight skip
#jira none
#rnx

[CL 20594531 by mihnea balta in ue5-main branch]
2022-06-10 09:39:51 -04:00
zach bethel
67d0028aab Moved RDG uniform buffer creation off the render thread. Added AddSetupTask helper function for async tasks that are automatically waited on prior to execution.
#preflight 62a0d919fc5ffe569a6774c0

[CL 20560693 by zach bethel in ue5-main branch]
2022-06-08 14:00:10 -04:00
Guillaume Abadie
0734868f53 Implements DynamicRenderScaling API with GPU timing measurement integrated within RDG
This allows to define a new dynamic scaling in the renderer with low amount of boiler plate:

DynamicRenderScaling::FHeuristicSettings GetDynamicTranslucencyResolutionSettings()
{
	RenderingDynamicScaling::FHeuristicSettings BucketSetting;
	BucketSetting.Model = RenderingDynamicScaling::EHeuristicModel::Quadratic;
	BucketSetting.bModelScalesWithPrimaryScreenPercentage = true;
	BucketSetting.MinResolutionFraction = ...
	...
	return BucketSetting;
}

DynamicRenderScaling::FBudget GDynamicTranslucencyResolution(TEXT("DynamicTranslucencyResolution"), &GetDynamicTranslucencyResolutionSettings);


And then simply define a scope to measure the GPU timing as such:

{
	DynamicRenderScaling::FRDGScope DynamicTranslucencyResolutionScope(GraphBuilder, GDynamicTranslucencyResolution);

	// add passes to GraphBuilder
}

#rb zach.bethel
#jira UE-152561
#preflight 628f1219bb14235aa38c904c

[CL 20376428 by Guillaume Abadie in ue5-main branch]
2022-05-26 01:58:36 -04:00
zach bethel
b480e5be5e Fixed crash in RDG due to transient extracted texture.
#jira UE-152668
#preflight trivial

[CL 20262222 by zach bethel in ue5-main branch]
2022-05-18 12:12:48 -04:00
zach bethel
8a1a598d53 Fixed static analysis error and added more assert information to catch regression.
#preflight trivial
#jira UE-152693

[CL 20247062 by zach bethel in ue5-main branch]
2022-05-17 13:54:01 -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
e37a08177c Submit async compute work prior to a fence from graphics -> async compute so that prior work isn't grouped with the submission to work around an issue in D3D12, which currently brute forces a fence from graphics to async compute any time graphics work is submitted.
#preflight 627c359a9f7ad2a14b8388d0
#fyi sebastien.hillaire

[CL 20152556 by zach bethel in ue5-main branch]
2022-05-11 18:40:35 -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
jeannoe morissette
94b6b81129 VulkanRHI: Add possibility to force depth and stencil to always be treated together when considering transitions in RDG since underlying VulkanRHI cannot track them separately:
- when CopySrc or CopyDest is set on either depth or stencil, force the range to include the entire texture.
- force the transitions of both depth and stencil to occur on the same pass (do not split the copy transition into two different passes if StateBefore is not the same).

#rb zach.bethel
#jira UE-143575,UE-147932
#preflight 6272c703365de864c4be9312

[CL 20050377 by jeannoe morissette in ue5-main branch]
2022-05-04 17:36:33 -04:00
zach bethel
224cc4fe24 Fix for RHI validation error in AncientGame.
#preflight none

[CL 20045330 by zach bethel in ue5-main branch]
2022-05-04 14:20:45 -04:00