Commit Graph

29 Commits

Author SHA1 Message Date
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
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
jason hoerner
0fb10e3017 MGPU: Fixes for Lumen, solving issues with black or too dark lighting on secondary GPUs or when swapping GPU assignments for a view.
* Page captures are now tracked separately per GPU, to avoid problems with uninitialized pages on other GPUs.  Pages that need capturing for the first time on a given GPU are prioritized and not counted against the throttled limit for page recaptures.
* Lumen scene buffer uploads are run across all GPUs.
* Lumen one-time procedural texture generation (OctahedralSolidAngleTexture) runs across all GPUs.
* DumpGPU was upgraded to be able to preview compressed formats used by Lumen (BC4, BC5, BC6H, BC7), critical for debugging Lumen behavior.

#jira UE-146458
#rnx
#rb krzysztof.narkowicz guillaume.abadie
#preflight 62374b6ff101b8d0afc6ac7f
#lockdown Mihnea.Balta

#ROBOMERGE-AUTHOR: jason.hoerner
#ROBOMERGE-SOURCE: CL 19807327 in //UE5/Release-5.0/... via CL 19807923
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)

[CL 19812041 by jason hoerner in ue5-main branch]
2022-04-19 13:25:38 -04:00
juan canada
40c97ded70 Fixed compilation error introduced by 19547074 colliding with 19546929
[FYI] Edwin.Maynard, guilaume.abadie
#jira UE-147462
#rb none
#preflight none

#ROBOMERGE-AUTHOR: juan.canada
#ROBOMERGE-SOURCE: CL 19550057 via CL 19550110 via CL 19550143
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19560930 by juan canada in ue5-main branch]
2022-03-30 14:18:00 -04:00