Commit Graph

227 Commits

Author SHA1 Message Date
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
zach bethel
ac11396729 Fixed test and validation regressions due to RDG changes.
#preflight 6272a1f12f6d177be3c60a53
#jira UE-150908

[CL 20043535 by zach bethel in ue5-main branch]
2022-05-04 12:41:19 -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
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
49a06cd724 Fixed crash due to invalid extracted transient render target allocation lifetime.
#jira UE-148034
#preflight trivial

[CL 19627706 by zach bethel in ue5-main branch]
2022-04-05 13:14:19 -04:00