Commit Graph

32 Commits

Author SHA1 Message Date
Guillaume Abadie
5bc5350126 Fixes a bug on DumpGPU with Texture2DArray bound to FRenderTargetBinding with ArraySlice==-1
#rb trivial
#jira UE-181710
#preflight 642af2ccce01db47aca7f812

[CL 24947763 by Guillaume Abadie in ue5-main branch]
2023-04-06 13:26:04 -04:00
Guillaume Abadie
77df14a99e Fixes ERHIAccess::CopyDest not being in DumpGPU's output resources
#rb trivial
#jira none
#preflight 6425f79c50546ea3365d02ce

[CL 24860823 by Guillaume Abadie in ue5-main branch]
2023-03-30 17:28:52 -04:00
guillaume abadie
6437b3972e Implements r.DumpGPU.FrameCount
#jira IRON-449
#rb trivial
#preflight 6400b588a20ddf1bf4320725

[CL 24483054 by guillaume abadie in ue5-main branch]
2023-03-02 11:10:48 -05:00
guillaume abadie
5f9147b105 Fixes a crash in DumpGPU due to cvar using ECVF_SetByGameOverride
#rb trivial
#preflight skip

[CL 24224869 by guillaume abadie in ue5-main branch]
2023-02-14 20:22:16 -05:00
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
christopher waters
c6c2200520 Adding includes before cleaning up RHI dependencies.
[CL 23888475 by christopher waters in ue5-main branch]
2023-01-27 14:17:39 -05:00
zach bethel
b852db62b9 Added RHI resource lifetime scopes which defer deletion of unreferenced resources until all scopes are closed.
The RDG builder holds a scope in order to avoid deletion of any resources during the graph setup / execution. This resolves the need to hold a strong reference during the RDG graph lifetime.

If FlushPendingDeletes is called within one of these scopes, the resources are instead queued onto the immediate command list and flushed at the end of the scope.

This change removes strong references held of uniform buffers held by RHI commands and certain platform contexts. When a flush is encountered, the backends will clear all caches removing any potential dangling references.

Resources can opt out of lifetime extension by calling ->DisableLifetimeExtension(). Subsequent calls to FlushPendingDeletes will release the resource immediately. This is used by a couple edge cases where resources must be deleted mid-frame (namely, DumpGPU and BVH building).

#rb christopher.waters
#preflight 63c5e5722e714f64ad017cfd

[CL 23734079 by zach bethel in ue5-main branch]
2023-01-16 19:13:49 -05:00
bob tellez
971983eb65 [Backout] - CL23624045
[FYI] christopher.waters
Original CL Desc
-----------------------------------------------------------------
RHI header dependency cleanup
- Reducing other header dependencies from RHIDefinitions.h
- Moved a few functions to the new RHIStrings.h
- Uniform buffer layout initializer moved to its own file to reduce RHI dependency on MemoryLayout.

#preflight 63bca752577437afe604b097

[CL 23631957 by bob tellez in ue5-main branch]
2023-01-10 15:28:15 -05:00
christopher waters
3df5dae685 RHI header dependency cleanup
- Reducing other header dependencies from RHIDefinitions.h
- Moved a few functions to the new RHIStrings.h
- Uniform buffer layout initializer moved to its own file to reduce RHI dependency on MemoryLayout.

#preflight 63bca752577437afe604b097

[CL 23631946 by christopher waters in ue5-main branch]
2023-01-10 15:27:33 -05:00
christopher waters
fa2ebfe998 Adding includes to rendering cpp files in preparation for header changes.
#preflight 6387bd29fa053c489ad45427

[CL 23343615 by christopher waters in ue5-main branch]
2022-11-30 18:29:09 -05:00
guillaume abadie
efedd65122 Implements r.DumpGPU.Delay
#rb none
#preflight 635859ac2e6690262ac2a16e

[CL 22798566 by guillaume abadie in ue5-main branch]
2022-10-26 19:11:42 -04:00
guillaume abadie
bde0b242e7 Fixes warning for missing FDumpTextureCS in shipping builds
#rb trivial
#preflight 633c2431896655606e4ac58b

[CL 22331042 by guillaume abadie in ue5-main branch]
2022-10-04 11:07:08 -04:00
brian white
3c09ace274 Deprecate RHISupportsComputeShaders()
#jira UE-107293
#rb Stu.Mckenna Chris.Waters
#preflight https://horde.devtools.epicgames.com/job/6318a06e967ffc68fb919bae

[CL 21850273 by brian white in ue5-main branch]
2022-09-07 10:18:52 -04:00
Guillaume Abadie
babd5c6738 Limits the size of staged buffer when dump large resources with DumpGPU
#rb none
#jira UE-160972
#preflight 62fad020e41faed68ae265c1

[CL 21404209 by Guillaume Abadie in ue5-main branch]
2022-08-16 09:41:50 -04:00
Jason Nadro
9c36c843b8 Removed unacceptable words from RenderCore.
#rb trivial
#jira UE-158668
#preflight 62c840a57e606620fd5c2847

[CL 21007335 by Jason Nadro in ue5-main branch]
2022-07-08 10:54:10 -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
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
christopher waters
4b9e68073c Deprecating RHICreateTexture2D and RHICreateTextureExternal2D.
#jira none
#rb zach.bethel
#preflight 627a6ec010766ef8c1f54f1e

[CL 20129702 by christopher waters in ue5-main branch]
2022-05-10 17:13:37 -04:00
zach bethel
2156756315 Replaced use of CopyToResolveTarget with CopyTexture.
#preflight 627a90ff7e5f24d1edd73422
#rb luke.thatcher, jason.hoerner

[CL 20127337 by zach bethel in ue5-main branch]
2022-05-10 14:47:34 -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
95da1ff33f DumpGPU: Skip AvailableVirtual in IsUnsafeToDumpResource check if it's exactly 0 (value when it's not supported).
#rb Guillaume.Abadie
#preflight 6273d2596a646b1d153d86af
#rnx

[CL 20057045 by jeannoe morissette in ue5-main branch]
2022-05-05 09:43:53 -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
guillaume abadie
d4b1dc7ad5 Adds OS name and version into DumpGPU's informations tab
#rb trivial
#preflight trivial

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 20025927 via CL 20025954 via CL 20025973
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20029272 by guillaume abadie in ue5-main branch]
2022-05-03 14:19:54 -04:00
guillaume abadie
4dc8472228 Adds support for Texture2DArray in DumpGPU
#rb juan.canada
#preflight 62711cc29d6c2f8f5b1a2111

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 20023927 via CL 20023941 via CL 20023946
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20024812 by guillaume abadie in ue5-main branch]
2022-05-03 09:58:16 -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