Commit Graph

856 Commits

Author SHA1 Message Date
josh adams
0ad33526bb - Avoid double calls to FEngineLoop::AppExit() (was happening in a Program that called it while exiting, but Mac also calls AppExit in it's standard Wrapper code)
#rb josh.adams

[CL 29155958 by josh adams in ue5-main branch]
2023-10-26 19:21:57 -04:00
matt peters
e53bae0868 MPCook: Add global function UE::GetMultiprocessId to handle the commandline parsing of MultiprocessId for CookWorkers.
#rnx
#rb Zousar.Shaker

[CL 28938402 by matt peters in ue5-main branch]
2023-10-19 18:18:01 -04:00
guillaume abadie
079ed4f3a4 Implements r.DumpGPU.CameraCut
#jira UE-192501, UE-179496

[CL 28620797 by guillaume abadie in ue5-main branch]
2023-10-10 11:13:43 -04:00
lorry li
b2c5f3e4db Load boot hotfix cvars after config system initialized, persistency dir checking has dependency to it on console.
[REVIEW] [at]michael.atchison [at]michael.kirzinger [at]joe.barnes
#rb [at]michael.atchison [at]michael.kirzinger

#tests Tested on console with boot hotfix applied.
#jira UE-196854

[CL 28415511 by lorry li in ue5-main branch]
2023-10-03 11:24:20 -04:00
zach bethel
c92cf39716 Refactored render command fence implementation to fence render command pipes.
- Reimplemented render command fence bundler flushing to keep the bundler active during a GC.
 - Added insights regions to track render command pipe recording and fence bundler activity when the render commands channel is active.
 - Cleaned up render command pipe recording so that it works properly with the fence bundler.

#rb chrisopher.waters
[FYI] Dominic.Couture

[CL 28206922 by zach bethel in ue5-main branch]
2023-09-25 17:29:10 -04:00
robert millar
1c1df0ca9c Additional insights CPU profiling scopes
[CL 28095545 by robert millar in ue5-main branch]
2023-09-21 14:22:33 -04:00
josh adams
aeb5cb1347 - Restoring a backout after fixing the issue that causes the backout
[Backout] - CL27745134
[FYI] stan.hormell
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL27731288 - CIS / Build Errors
[FYI] Josh.Adams
Original CL Desc
-----------------------------------------------------------------
- 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 27923017 by josh adams in ue5-main branch]
2023-09-15 13:39:02 -04:00
robert millar
387bb0bd06 Add ability to presize name table in editor for large projects.
Example config in Editor.ini:

[Names]
PreallocateNames=10485760
PreallocateNameMemoryMB=900

#rb ben.zeigler

[CL 27883674 by robert millar in ue5-main branch]
2023-09-14 12:46:21 -04:00
zach bethel
b1ffe1f273 Flush rendering commands prior to clearing pending delete objects at shutdown.
#jira UE-194136
#rb christopher.waters

[CL 27767314 by zach bethel in ue5-main branch]
2023-09-11 15:41:46 -04:00
stan hormell
37bad2d07b [Backout] - CL27731288 - CIS / Build Errors
[FYI] Josh.Adams
Original CL Desc
-----------------------------------------------------------------
- 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 27745141 by stan hormell in ue5-main branch]
2023-09-10 22:58:21 -04:00
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