Commit Graph

894 Commits

Author SHA1 Message Date
tim smith
9e2d90ae37 Fixed verse build phase to happen after new UObjects have been registered in the engine. Wrong delegate was being used causing the build to happen prior to UObject definitions in some instances.
#rb Markus.Breyer

[CL 32016832 by tim smith in ue5-main branch]
2024-03-05 07:55:24 -05:00
tim smith
bb82c364fa [Backout] - CL31986565
[FYI] Tim.Smith
Original CL Desc
-----------------------------------------------------------------
Fixed verse build phase to happen after new UObjects have been registered in the engine.  Wrong delegate was being used causing the build to happen prior to UObject definitions in some instances.

#rb Markus.Breyer

[CL 31992544 by tim smith in ue5-main branch]
2024-03-04 12:47:35 -05:00
tim smith
20a0554192 Fixed verse build phase to happen after new UObjects have been registered in the engine. Wrong delegate was being used causing the build to happen prior to UObject definitions in some instances.
#rb Markus.Breyer

[CL 31986595 by tim smith in ue5-main branch]
2024-03-04 08:30:11 -05:00
tim smith
fa0b37588c Improve the support for notification that UObjects have been registered. This includes the callback always being registered regardless of the target options.
#rb ben.zeigler, tim.smith

[CL 31944532 by tim smith in ue5-main branch]
2024-03-01 11:00:06 -05:00
tim smith
fae5f7c09d [Backout] - CL31912492
[FYI] Tim.Smith
Original CL Desc
-----------------------------------------------------------------
Improve the support for notification that UObjects have been registered.  This includes the callback always being registered regardless of the target options.

#rb ben.zeigler

[CL 31917272 by tim smith in ue5-main branch]
2024-02-29 14:01:55 -05:00
tim smith
3a5892ffbe Improve the support for notification that UObjects have been registered. This includes the callback always being registered regardless of the target options.
#rb ben.zeigler

[CL 31912821 by tim smith in ue5-main branch]
2024-02-29 12:17:23 -05:00
paul chipchase
1899cdb4f8 Fix a rare crash in the BulkDataRegistry that can occur when shutting down the editor.
#rb Matt.Peters
#jira UE-208080
#rnx

- The bulkdata registry can spawn async jobs that need to load bulkdata payloads from disk (so that we can calculate the hashes) and this loading can be done via IPackageResourceManager. So if these jobs are running after IPackageResourceManager has been shutdown we can run into problems.
- It should be safe to move the call to shutdown the bulkdata registry system before the call to shutdown the package resource manager. The bulkdata registry shutdown code will wait until all pending jobs have been cleaned up, after which it should then be safe for us to shutdown the package resource manager.

[CL 31908903 by paul chipchase in ue5-main branch]
2024-02-29 10:41:50 -05:00
luke thatcher
808b695e4f Replace use of FRHICommandListExecutor::GetImmediateCommandList() with FRHICommandListImmediate::Get()
- Only in places where it is trivially proven the call is only made on the render thread, due to an existing check(IsInRenderingThread()) assert somewhere in the function.
 - FRHICommandListImmediate::Get() itself contains a check(IsInRenderingThread()), so this enforces correct threading, and removes the need for extra checks at the call sites.
 - Remaining uses of FRHICommandListExecutor::GetImmediateCommandList() need investigation. Some may be bugs.
 - Also some changes to make use of the passed-in RHICmdList where possible (e.g. render commands that are given the immediate command list, but call the global getter rather than using the argument they were given).

#rb zach.bethel

[CL 31699633 by luke thatcher in ue5-main branch]
2024-02-21 17:26:04 -05:00
daniele pieroni
dfacc4ff94 - Add time scope for InitializeAfterProjectFilePath that can take more than 5 seconds during handshake
- Sort host address by loopback addresses (IPV6 and IPV4) and local host subnet in order to improve the chances of having a successfull connection at the first attempt and avoid possible timeouts

#jira UE-207222
#rb Josie.Yang, Zousar.Shaker

[CL 31652038 by daniele pieroni in ue5-main branch]
2024-02-20 14:06:48 -05:00
jason hoerner
8e7772179c Movie Render Queue: fix for motion vectors being lost when modifying the material between renders, leading to loss of motion blur and other artifacts.
Major fix is to ensure use of a consistent GFrameCounter value in animation and rendering with the rest of the frame, by moving increment of this value until after the OnEndFrame delegate, where MRQ rendering occurs.  CSV stat generation end frame call is moved after the GFrameCounter increment, to preserve a side effect when the code calls PlatformMemoryHelpers::GetFrameMemoryStats, which caches platform memory by frame, so that continues to happen at a consistent time (will always be the first call for a given GFrameCounter value, which was the case before).  Removed support for OverrideFrameCounter value in FSceneViewFamily previously used as a workaround (the value is still in the structure, but no longer set or used).

A further minor fix is necessary, which involves moving logic that sets "PreviousBoneTransformRevisionNumber" to "CurrentBoneTransformRevisionNumber" so it happens in UpdateBoneTransformRevisionNumber instead of CreateRenderState_Concurrent and SendRenderDynamicData_Concurrent.  This makes it so additional calls to CreateRenderState_Concurrent in a frame (due to material changes) see the same value for "PreviousBoneTransformRevisionNumber".  Animation updates can be called more than once during Tick, so a frame number is added to track when bone transforms were updated, so the previous revision number is only updated once.  We also send that frame number to the render state instead of the current GFrameCounter.  With these changes, render state exactly mirrors the component state, producing consistent results following re-creation.

#jira UE-206217
#rnx
#rb Josie.Yang

[CL 31545289 by jason hoerner in ue5-main branch]
2024-02-15 19:04:22 -05:00
tim smith
abb4b1dd95 Modified the launching executable name check to allow for any matching executable editor name instead of just the first one. This better supports multiple targets.
#rnx
#rb Josh.Adams

[CL 31378394 by tim smith in ue5-main branch]
2024-02-12 06:48:50 -05:00
matt peters
5d295a17f1 IterativeCooker: ConfigAccessTracking: Replace the limited tracking present in AccessDetection::ConfigIni with a more detailed version that calls arbitrary callbacks on each ConfigValue read. The cooker subscribes to the callback and records the ConfigValue that was read as a dependency of the current package in scope according to PackageAccessTracking scopes.
#jira UE-133736
[RN] Minor, Foundation
#rb Josh.Adams, Zousar.Shaker


#changelist validated
#virtualized

[CL 31224638 by matt peters in ue5-main branch]
2024-02-06 14:09:37 -05:00
jason hoerner
2b0f208938 Visualize Texture: Performance and feature upgrades.
* Visualize texture system starts out in an inactive state until a command is issued, avoiding overhead of tracking views and scene textures, saving 1.4% on the render thread.
* Visualization overhead eliminated for views besides the one currently being visualized.
* Support for visualization of textures from scene captures, via "view=N" option (specifying the unique ID of the view), with "view=?" displaying a list of views for reference.
* Improved visualization for cube maps.  PIP uses 2:1 aspect for the longitudinal render to match resource viewer display, and pixel perfect option shows tiled flat cube map faces (actual pixels) rather than running a projection.
* Padding for scene or screen pass textures is removed in the visualization -- the padding otherwise shows up as garbage or blank space.

To remove scene texture padding, it's necessary to add a field to RDG textures to provide an option to track the viewport sizes that were rendered for a given texture.  If not set, the assumption is the whole texture was rendered.  The field is set for FSceneTextures and FScreenPassTexture, covering the vast majority of cases, plus the denoiser was spot fixed -- worst case if any other cases are missed, you still see the padding.  You can tell padding was present when visualizing by contrasting the texture size with the viewport size.

Padding was always a potential issue for the visualizer, but is exacerbated by scene captures, as the padded scene textures are set to a size that's a union of the main view and any scene captures.  Padding is also exacerbated by dynamic resolution scaling, as the buffers will be padded to the maximum resolution.  For example, a cube map rendering at 512x512 will have 93% of the pixel area as padding if the front buffer is at 1440p, or the default dynamic resolution setup will have 70% of the pixels as padding at minimum res.

#rb Jason.Nadro

[CL 31160232 by jason hoerner in ue5-main branch]
2024-02-03 16:07:46 -05:00
jamie dale
f1a9667d1b Fixed TreatWarningsAsErrors not affecting the verbosity of the underlying log, and added TreatErrorsAsWarnings
This was a regression from 23567776, as previously the platform specific feedback context (eg, FWindowsNativeFeedbackContext) would modify the verbosity that was passed to the underlying GLog/GLogConsole.
This change restores the old behavior at the new code location (FFeedbackContext).

#rb Devin.Doucette

[CL 31106926 by jamie dale in ue5-main branch]
2024-02-01 17:44:34 -05:00
Luke Thatcher
10cdd4a111 Merging //UE5/Dev-ParallelRendering/... (up to CL 30965645) to //UE5/Main/... (base CL 30962637)
Significant refactor of RHI command list management and submission, and RHI breadcrumbs / RenderGraph (RDG) scopes, to allow for parallel translation of most RHI command lists.
See individual changelists in //UE5/Dev-ParallelRendering for details. A summary of the changes is as follows:

This work's primary goal was to allow as many RHI command lists as possible to be parallel translated, to make more efficient use of many-core systems. To achieve this:
 - The submission code paths for the immediate and parallel RHI command lists have been merged into a single function: FRHICommandListExecutor::Submit().
 - A "dispatch thread" (which is simply a series of chained task graph tasks) is used to decide which command lists are batched together in a single parallel translate job.
 - Individual command lists can disable parallel translate, which forces them to be executed on the RHI thread. This happens automatically if an RHI command list performs an operation that is not thread safe (e.g. buffer lock, or low-level resource transition).

One of the primary blockers for parallel translation was the RHI breadcrumb system, and the way RDG builds scopes. This was also refactored to remove these limitations:
 - RDG could only push/pop events on the immediate command list, which resulted in parallel and immediate work being interleaved, breaking any opportunity for parallelism.
 - Platform RHI implementations of breadcrumbs (e.g. in D3D12 RHI) was not correct across multiple RHI contexts. Push/pop operations aren't necessarily balanced within any one RHI context given that RDG builds "parallel pass sets" containing arbitrary ranges of renderer passes.

A summary of the new RHI breadcrumb system is as follows:
 - A tree of breadcrumb nodes is built by the render thread and RDG. Each node contains the node name, and pointers to the parent and next nodes. When fully built, the nodes form a depth-first linked list which is used for traversing the tree for GPU crash debugging.
 - The memory for breadcrumb nodes is provided by ref-counted allocator objects. These allocators are pipelined through the RHI, allowing the platform RHI implementation to extend their lifetime for GPU crash debugging purposes.
 - RHIPushEvent / RHIPopEvent have been removed, replaced with RHIBeginBreadcrumbGPU / RHIEndBreadcrumbGPU. Platform RHIs implement these functions to perform GPU immediate writes using the unique ID of each node, for tracking GPU progress.
 - Format string arguments are captured by-value to remove the cost of string formatting while building the breadcrumb tree. String formatting only occurs when the actual formatted string is required (e.g. during GPU crash breadcrumb stack traversal, or when calling platform GPU profiling APIs).

RenderGraph scopes have been simplified:
 - The separate scope trees / arrays of ops have been combined. There is now a single tree of RDG scopes containing all types.
 - Each RDG pass holds a pointer to the scope it was created under.
 - BeginCPU / EndCPU is called on each RDG scope as the various RDG threads enter / exit them. This allows us to mark-up each worker thread with the relevant Unreal Insights scopes.

Other changes include:
 - Fixes for bugs uncovered when parallel translate was enabled.
 - Adjusted platform affinities necessary due to the new layout of thread tasks in the renderer.
 - Refactored RHI draw call stats to better fit the new pipeline design.

#rb jeannoe.morissette, zach.bethel
#jira UE-139543

[CL 30973133 by Luke Thatcher in ue5-main branch]
2024-01-29 12:47:28 -05:00
steve robb
f029468598 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30729174 by steve robb in ue5-main branch]
2024-01-19 16:41:35 -05:00
jodon karlik
4250442a43 Improving multiple PIE session VisLog capabilities. The TimeStamp used is now a global Engine TimeStamp. The WorldTimeStamp is also recorded separately for ease of debugging. By using this Engine TimeStamp during PIE sesions, we can correctly record the time for client & server events, allowing us to see the effects of replicated data more clearly on the timeline.
When using bForceUniqueLogNames, we record offsets to an initial Engine TimeStamp which gives us similar functionality to just using WorldTimeStamp in the Log Visualizer (i.e. multiple runs will line-up at time 0).
When not using bForceUniqueLogNames, we only record the offset when the data is cleared in the Log Visualizer.  That will allow multiple runs to record properly on a single timeline (rather than having new data overwrite old data).

bForceUniqueLogNames is now the default setting.

#jira UE-203873
#rb ben.hoffman, Mieszko.Zielinski, Yoan.StAmant
#lockdown marc.audy

[CL 30639009 by jodon karlik in ue5-main branch]
2024-01-16 13:55:38 -05:00
jason hoerner
83fd93e740 [Backout Resubmit with missing include build fix]
SlackReport debug command for TArray slack tracking.
* Requires ENABLE_ARRAY_SLACK_TRACKING define to be enabled at compile time (enabling the tracking all the time would be too significant a performance hit, as it requires a function call per array count change).
* Generates TSV (tab separated value) reports in Shared/Logs/SlackReport, which can be loaded into a spreadsheet program.  A filename can be specified to the command, or a default one with an incrementing index will be used.
* Switch -Stack=N controls the number of stack frames used for sorting.  Setting a value less than the maximum (9 levels) can coalesce instances of the same allocation from slightly different call stacks.  Switch -Verbose=0 enables a more condensed report that only shows the largest unique Num / Max bucket per call stack.

#rb Steve.Robb

[CL 30346075 by jason hoerner in ue5-main branch]
2023-12-15 06:58:37 -05:00
justin peterson
b84c432245 [Backout] - CL30332333 - CIS Compile Error
[FYI] jason.hoerner
Original CL Desc
-----------------------------------------------------------------
SlackReport debug command for TArray slack tracking.
* Requires ENABLE_ARRAY_SLACK_TRACKING define to be enabled at compile time (enabling the tracking all the time would be too significant a performance hit, as it requires a function call per array count change).
* Generates TSV (tab separated value) reports in Shared/Logs/SlackReport, which can be loaded into a spreadsheet program.  A filename can be specified to the command, or a default one with an incrementing index will be used.
* Switch -Stack=N controls the number of stack frames used for sorting.  Setting a value less than the maximum (9 levels) can coalesce instances of the same allocation from slightly different call stacks.  Switch -Verbose=0 enables a more condensed report that only shows the largest unique Num / Max bucket per call stack.

#rb Steve.Robb

[CL 30336635 by justin peterson in ue5-main branch]
2023-12-14 18:42:26 -05:00
jason hoerner
290975eb21 SlackReport debug command for TArray slack tracking.
* Requires ENABLE_ARRAY_SLACK_TRACKING define to be enabled at compile time (enabling the tracking all the time would be too significant a performance hit, as it requires a function call per array count change).
* Generates TSV (tab separated value) reports in Shared/Logs/SlackReport, which can be loaded into a spreadsheet program.  A filename can be specified to the command, or a default one with an incrementing index will be used.
* Switch -Stack=N controls the number of stack frames used for sorting.  Setting a value less than the maximum (9 levels) can coalesce instances of the same allocation from slightly different call stacks.  Switch -Verbose=0 enables a more condensed report that only shows the largest unique Num / Max bucket per call stack.

#rb Steve.Robb

[CL 30332344 by jason hoerner in ue5-main branch]
2023-12-14 16:52:04 -05:00
ahmed siddique
d70352cd9b Android SingleInstance Service
Tested on Android with Lyra and also preflight checks.

#android
#rb chris.babcock

[CL 30244258 by ahmed siddique in ue5-main branch]
2023-12-11 13:59:52 -05:00
dan elksnitis
880311d64f [shaders] generate brdf headers for the default platform before initializing shader types (the latter now has a side-effect of pre-loading and caching shader source file information for this platform, which means if the brdf headers need to change it will cache an outdated version)
#rb massimo.tristano

[CL 30154026 by dan elksnitis in ue5-main branch]
2023-12-06 09:41:04 -05:00
christopher waters
7b1717159f Dependency Cleanup
- Moving IAssetCompilingManager to its own header
- Changing FAsyncCompilationNotification members to TUniquePtr<FAsyncCompilationNotification> to remove dependencies on AsyncCompilationHelpers.h
- Removing includes of AsyncCompilationHelpers.h and AssetCompilingManager.h removes 3s of compile time per file on a 3990x

#rb henrik.karlsson

[CL 30094069 by christopher waters in ue5-main branch]
2023-12-04 16:06:02 -05:00
alex kahn
eee2dd4151 [Backout] - CL30051221 - CIS Compile Error
[FYI] christopher.waters
Original CL Desc
-----------------------------------------------------------------
Dependency Cleanup
- Moving IAssetCompilingManager to its own header
- Changing FAsyncCompilationNotification members to TUniquePtr<FAsyncCompilationNotification> to remove dependencies on AsyncCompilationHelpers.h
- Removing includes of AsyncCompilationHelpers.h and AssetCompilingManager.h removes 3s of compile time per file on a 3990x

#rb henrik.karlsson

[CL 30054260 by alex kahn in ue5-main branch]
2023-12-01 16:35:33 -05:00
christopher waters
f665a777c7 Dependency Cleanup
- Moving IAssetCompilingManager to its own header
- Changing FAsyncCompilationNotification members to TUniquePtr<FAsyncCompilationNotification> to remove dependencies on AsyncCompilationHelpers.h
- Removing includes of AsyncCompilationHelpers.h and AssetCompilingManager.h removes 3s of compile time per file on a 3990x

#rb henrik.karlsson

[CL 30051281 by christopher waters in ue5-main branch]
2023-12-01 15:32:12 -05:00