Commit Graph

871 Commits

Author SHA1 Message Date
josh adams
a8a9a0b759 - Deprecated GetSectionPrivate and FindOrAddSection, and accessors in FConfigFile that could return a non-const FConfigSection (this is so we can track modifications to config values)
- Added AddToSection, RemoveKeyFromSection, etc to replace directly accessing a FConfigSection
- Fixed up Epic code for the deprecations (at least the majority, some projects that aren't built by Horde presubmit may have some that we will address going forward)
#jira UE-194955
#rb david.harvey and various others

[CL 27731364 by josh adams in ue5-main branch]
2023-09-08 17:58:55 -04:00
eric knapik
5b39b5f207 #jira: UE-167025
Add additional test string for where the PreInit module might be located

[REVIEW] [at]Per.Larson [at]PJ.Kack [at]Graeme.Thornton

[CL 27558915 by eric knapik in ue5-main branch]
2023-09-01 12:45:51 -04:00
tim smith
d758896471 Move VerseVM to CoreUObject to facilitate the merging of UEGC and VerseGC
#rb saam.barati phil.pizlo

[CL 27374952 by tim smith in ue5-main branch]
2023-08-25 09:08:53 -04:00
zach bethel
b5b17e2ae7 Render Command Pipe Implementation and API
Render Command Pipes dedicated asynchronous task pipes for render commands. Users can easily define new pipes and enqueue commands into them. Pipes can be synchronized using a scope to run serial render commands on the render thread, but initially pipes cannot be synchronized individually with each other. Render command overhead is reduced by recording command lambdas into MPSC queues which are serviced by the task graph; both for pipes and for the render thread. This reduces the task overhead as commands are no longer 1-to-1 with tasks.

Pipe behavior is controlled with new CVars. `r.RenderCommandPipeMode` controls overall behavior:
 0 - Legacy render thread tasks,
 1 - Render thread MPSC queue,
 2 - Render thread and async pipe MPSC queues.

To define a Render Command Pipe, use DEFINE_RENDER_COMMAND_PIPE(MyPipe), or DECLARE_RENDER_COMMAND_PIPE(MyPipe, MODULE_API) to declare an extern reference.

Enqueue a command into the pipe like so:

ENQUEUE_RENDER_COMMAND(MyCommand)(UE::RenderCommandPipe::MyPipe, [] (FRHICommandList&) {}).

Omitting a pipe will fallback to the 'general' pipe which is the render thread.

Eventually pipes need to be synced back to the general pipe for scene renders and other GPU work. On the game thread timeline, use UE::RenderCommandPipe::FSyncScope to synchronize the pipes. This waits for pipes and disables recording of new pipe commands until the scope completes, at which point pipe recording is restarted. This creates a 'sync point', so render commands issued prior to a sync scope will be waited on at the start of the scope, and render commands issued after the scope ends will not be able to start until the render thread finishes processing prior commands.

#rb christopher.waters, luke.thatcher

[CL 27074956 by zach bethel in ue5-main branch]
2023-08-14 12:52:45 -04:00
rob krajcarski
5037dd9bd0 Fix for leaking render objects on app exit caused by EngineLoop not processing the last set of pending cleanup objects it acquired
#rb stu.mckenna

[CL 27072268 by rob krajcarski in ue5-main branch]
2023-08-14 11:46:59 -04:00
bob tellez
afd943db61 [Backout] - CL27042396 and 27048615
[FYI] zach.bethel
Original CL Desc
-----------------------------------------------------------------
Render Command Pipe Implementation and API

Render Command Pipes dedicated asynchronous task pipes for render commands. Users can easily define new pipes and enqueue commands into them. Pipes can be synchronized using a scope to run serial render commands on the render thread, but initially pipes cannot be synchronized individually with each other. Render command overhead is reduced by recording command lambdas into MPSC queues which are serviced by the task graph; both for pipes and for the render thread. This reduces the task overhead as commands are no longer 1-to-1 with tasks.

Pipe behavior is controlled with new CVars. `r.RenderCommandPipeMode` controls overall behavior:
 0 - Legacy render thread tasks,
 1 - Render thread MPSC queue,
 2 - Render thread and async pipe MPSC queues.

To define a Render Command Pipe, use DEFINE_RENDER_COMMAND_PIPE(MyPipe), or DECLARE_RENDER_COMMAND_PIPE(MyPipe, MODULE_API) to declare an extern reference.

Enqueue a command into the pipe like so:

ENQUEUE_RENDER_COMMAND(MyCommand)(UE::RenderCommandPipe::MyPipe, [] (FRHICommandList&) {}).

Omitting a pipe will fallback to the 'general' pipe which is the render thread.

Eventually pipes need to be synced back to the general pipe for scene renders and other GPU work. On the game thread timeline, use UE::RenderCommandPipe::FSyncScope to synchronize the pipes. This waits for pipes and disables recording of new pipe commands until the scope completes, at which point pipe recording is restarted. This creates a 'sync point', so render commands issued prior to a sync scope will be waited on at the start of the scope, and render commands issued after the scope ends will not be able to start until the render thread finishes processing prior commands.

#rb christopher.waters, luke.thatcher

[CL 27054009 by bob tellez in ue5-main branch]
2023-08-11 20:05:11 -04:00
zach bethel
2d143afc83 Render Command Pipe Implementation and API
Render Command Pipes dedicated asynchronous task pipes for render commands. Users can easily define new pipes and enqueue commands into them. Pipes can be synchronized using a scope to run serial render commands on the render thread, but initially pipes cannot be synchronized individually with each other. Render command overhead is reduced by recording command lambdas into MPSC queues which are serviced by the task graph; both for pipes and for the render thread. This reduces the task overhead as commands are no longer 1-to-1 with tasks.

Pipe behavior is controlled with new CVars. `r.RenderCommandPipeMode` controls overall behavior:
 0 - Legacy render thread tasks,
 1 - Render thread MPSC queue,
 2 - Render thread and async pipe MPSC queues.

To define a Render Command Pipe, use DEFINE_RENDER_COMMAND_PIPE(MyPipe), or DECLARE_RENDER_COMMAND_PIPE(MyPipe, MODULE_API) to declare an extern reference.

Enqueue a command into the pipe like so:

ENQUEUE_RENDER_COMMAND(MyCommand)(UE::RenderCommandPipe::MyPipe, [] (FRHICommandList&) {}).

Omitting a pipe will fallback to the 'general' pipe which is the render thread.

Eventually pipes need to be synced back to the general pipe for scene renders and other GPU work. On the game thread timeline, use UE::RenderCommandPipe::FSyncScope to synchronize the pipes. This waits for pipes and disables recording of new pipe commands until the scope completes, at which point pipe recording is restarted. This creates a 'sync point', so render commands issued prior to a sync scope will be waited on at the start of the scope, and render commands issued after the scope ends will not be able to start until the render thread finishes processing prior commands.

#rb christopher.waters, luke.thatcher

[CL 27042459 by zach bethel in ue5-main branch]
2023-08-11 15:51:26 -04:00
jamie dale
d7482124d4 Added FCoreDelegates::OnCommandletPreMain and FCoreDelegates::OnCommandletPostMain
This allows things to hook in to provide additional initialization or shutdown logic for any commandlet that may be run.

FCoreDelegates::OnCommandletPreMain is akin to FCoreDelegates::OnFEngineLoopInitComplete (which doesn't run for commandlets).

#jira
#rb Rex.Hill

[CL 26520821 by jamie dale in ue5-main branch]
2023-07-21 14:40:45 -04:00
Matt Peters
3f65bde906 EngineStartup: Add IsEngineStartupModuleLoadingComplete so systems can take different behavior (for logging, user notification, other) when the engine is still initializing versus when initialization is complete.
Convert AssetRegistry to use this function instead of tracking the state itself.
#rb Ben.Zeigler
#rxn

[CL 26499128 by Matt Peters in ue5-main branch]
2023-07-20 18:05:44 -04:00
ben woodhouse
0f8e67f3e5 Show the current frame number in Insights as a hierarchical event (shows the CSV frame number if the CSV profiler is running).
#rb ionut.matasaru

[CL 26213148 by ben woodhouse in ue5-main branch]
2023-06-23 13:13:28 -04:00
sebastien lussier
043d6c47e8 Added UCommandlet::UseCommandletResultAsExitCode
* If enabled, process return code will always be the commandlet result code
* Used automatically when lauching WorldPartition builders from the editor (was the previous behavior before 25946840)
#rb jeanfrancois.dube

[CL 26212564 by sebastien lussier in ue5-main branch]
2023-06-23 12:52:29 -04:00
paul chipchase
46c360f493 Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default.
#rb none

### Dialog
- When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash.
- The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER).
- Once the dialog is displayed the user will have three options to continue.
-- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect.
-- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings.
-- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access.
- If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions.
- The dialog will not show if:
-- Slate is disabled for the current processor has not yet initialized
-- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned.
-- If the -unattended flag is set on the process.
-- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False)
-- If  'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed.
- If the dialog is now shown then the backend is marked as unconnected and will not work.

### Known Issues
- We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed.
- There is currently no good way to inform the user where their settings come from.
- There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example.

### Initialization
- In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized.
-- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering.

[CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
martin ridgers
53836ed4e0 Load IAS after GConfig has been initialised
#rb
#rnx
#jira

[CL 26086424 by martin ridgers in ue5-main branch]
2023-06-19 06:35:12 -04:00
graeme thornton
d46c2fa00f Ensure that when we set "ShowErrorCount=False" on an engine commandlet, we still return a non-zero error code when errors are written to the log... even if the commandlet itself returns 0. This replicates the behaviour that you get when ShowErrorCount=True
[CL 25946845 by graeme thornton in ue5-main branch]
2023-06-13 04:42:41 -04:00
lorry li
22935963f8 When get hotfixed, make marked cvars can be saved for next boot.
#jira UE-185766
[REVIEW] [at]alejandro.aguilar [at]chris.varnsverry [at]michael.kirzinger [at]rob.cannaday [at]evan.kinney
#rb [at]rob.cannaday

[CL 25635555 by lorry li in ue5-main branch]
2023-05-25 19:42:47 -04:00
per larsson
e5e1bd6962 I/O - added on demand I/O store modue to engine
#rb trivial
#preflight 645cd4bfea1c7ba4d696f4a2

[CL 25430013 by per larsson in ue5-main branch]
2023-05-11 12:47:00 -04:00
florin pascu
101e5cdd3d Fix Target Device Mobile Preview
#rb Jack.Porter
#preflight 645b692c6c35ad81e6cd44fc

[CL 25402029 by florin pascu in ue5-main branch]
2023-05-10 07:27:00 -04:00
eric knapik
a2b418ce2d #jira: none
Move project finding later to resolve issues where the .uproject file isn't in the assumed default location

#preflight 6452b5966538e45f75cac9db
#rb: Ben.Zeigler

[CL 25325475 by eric knapik in ue5-main branch]
2023-05-03 16:37:59 -04:00
dan oconnor
7c7e20d0aa Load ScriptableEditorWidgets even earlier, it was refactored out of UMGEditor and so to maintain backwards compatability we must load it here (UMG transitively loads UMGEditor)
#jira UE-184536
#rb Matt.Hoffman
#preflight

[CL 25310881 by dan oconnor in ue5-main branch]
2023-05-02 19:29:48 -04:00
eric knapik
27ddbbdbde #jira: UE-177511
Make UEFN a modular build
Move UEFNEngine.ini under the UEFN plugin so it correctly is loaded

[REVIEW] [at]Chris.Varnsverry, [at]Henrik.Karlsson, [at]Josh.Adams
#preflight 644aeb72b208f61af8395b09
#preflight 644b517b9c50ddcc0b171ca8

[CL 25309650 by eric knapik in ue5-main branch]
2023-05-02 18:25:37 -04:00
ionut matasaru
a1730cc477 Removed RenderCore's FTracingProfiler which is deprecated since UE 4.26. Please use Trace system and Unreal Insights instead.
#jira UE-172193
#rb Mihnea.Balta
#fyi Zach.Bethel
#fyi Luke.Thatcher
#preflight 6442a827f126d87e45f351db

[CL 25163509 by ionut matasaru in ue5-main branch]
2023-04-24 09:42:59 -04:00
ionut matasaru
0ccbd0fcde Added UE_STATS_MEMORY_PROFILER_ENABLED to toggle on/off code related to MemoryProfiler in STATS system. It still requires STATS to be enabled and "-MemoryProfiler" to be specified in cmd line.
This is off by default as MemoryProfiler in STATS system functionality is deprecated in UE 5.3. For memory profiling, use instead Trace/MemoryInsights and/or LLM.

#jira UE-183900
#rb Johan.Berg
#preflight 64428b470206a6e20f579812

[CL 25145603 by ionut matasaru in ue5-main branch]
2023-04-21 10:47:57 -04:00
ionut matasaru
c04fc14767 Removed the deprecated MemoryProfiler runtime:
* Removed code switched by USE_MALLOC_PROFILER.
* Removed the USE_MALLOC_PROFILER define and the MALLOC_PROFILER macro.
* Removed PLATFORM_RUNTIME_MALLOCPROFILER_SYMBOLICATION define.
* Removed FMallocProfilerEx and FMallocProfilerEx wrappers and the GMallocProfiler global variable.
* Removed console commands: "MPROF", "DUMPALLOCSTOFILE", "SNAPSHOTMEMORY" and "SNAPSHOTMEMORYFRAME".
Please use Unreal Insights (Memory Insights; -trace=memory) instead.

#jira UE-141779
#rb Johan.Berg
#preflight 6437f5dd00398d6f88b5b18f

[CL 25101805 by ionut matasaru in ue5-main branch]
2023-04-19 04:07:55 -04:00
charles bloom
e1500d76d7 LaunchEngineLoop log UE-CmdLineArgs
#rb none
#jira none
#preflight none

[CL 25013639 by charles bloom in ue5-main branch]
2023-04-12 15:40:02 -04:00
dan engelbrecht
db5e568754 Game client no longer needs -zenstoreproject or -zenstorehost arguments to correctly run with a COTF server which uses Zen.
Game client now accepts only -filehostip for connection to a CTOF server, -cookonthefly is no longer necessary and is ignored.
Game client will now receive ProjectName (ProjectId), Platform (OplogId), Zen server host name and port from COTF server if running with zenstore.
Fixed issues with generating the ProjectId from a path where drive letters where lower case.

#rb zousar.shaker pj.kack
#preflight

[CL 24889513 by dan engelbrecht in ue5-main branch]
2023-04-03 01:51:40 -04:00