Commit Graph

270 Commits

Author SHA1 Message Date
Matt Peters
aae0fe62eb PackageResourceManager and PackagePaths
Create a new interface IPackageResourceManager that handles all attempts to load packages from storage. The default implementation passes through to loading from IFileManager. Future implementations will load from other services such as the EditorDomain and TargetDomain.
Add FPackagePath class that holds a LocalFilePath or LongPackageName, or a relative path to a package under a mounted content root (which can be converted into either the LocalFilePath or LongPackageName).
Modify LinkerLoad, BulkData, and AsyncLoader to use FPackagePath and IResourceManager.
Modify UPackage and FLinkerLoad to have a FPackagePath instead of a Filename.
#rb Paul.Chipchase, CarlMagnus.Nordin, Francis.Hurteau, Devin.Doucette
#rn Major Core

[CL 14814912 by Matt Peters in ue5-main branch]
2020-11-25 22:11:10 -04:00
paul chipchase
ab3002c705 CIS Fix: Change the ::Unlock method for BulkData2 to be const to match the original API.
- This stops code compiling fine in the editor then breaking when compiled for a different config.

#rb Martin.Ridgers
#fyi ben.ingram
#rnx

[CL 14812609 by paul chipchase in ue5-main branch]
2020-11-25 08:14:11 -04:00
danny couture
c23f6884fe Async Static Mesh Compilation / Loading
- Add protection against async property accessed during async build and postload.
   - Split PostLoad into 3 steps with the most part now being made async.
   - Make Build/BatchBuild API async when the feature is activated.
   - Add a new StaticMesh compilation manager. (This will be refactory later to reduce duplicated code with texture compiler).
   - Skip RenderState creation for any static mesh component still being built so they only show up when ready.
   - Fixed DistanceField and MeshCard computation that might trigger too soon if fixups are required to RenderData during PostLoad.
   - Dynamic priorisation for building and updating static meshes nearest to the viewport.
   - Implement different PIE modes, current default is to stall only for mesh that might affect nagivation/collision for players/bots.
   - Add a new generic interface for assets being built (still a WIP).
   - Add ability in FrontEnd filters to skip serialization of asset being async compiled and refresh when compilation finishes.
   - Prevent auto-save while textures and static meshes are being built (same as shaders)
   - Logic has been reordered in some Fortnite Building Component to avoid unnecessarily touching static mesh properties.

General Optimizations
   - Use cached thumbnails until shaders/textures/static meshes are ready to improve performance and avoid rendering incomplete thumbnails.

DEBUGGING
 - Can be forcibly enabled/disabled through command-line via -asyncstaticmeshcompilation=[off, on, paused]
 - Can pause staticmesh compilation using Editor.AsyncStaticMeshCompilation = 2 or -asyncstaticmeshcompilation=paused
 - Can manually resume a specified amount of paused compilation using Editor.AsyncStaticMeshCompilationResume [Num]
 - Can forcibly wait on all compilation using Editor.AsyncStaticMeshCompilationFlushAll

BENCHMARKS
 - 2m19s to 17.9s for Loading FortGPUTestbed's LumenTest with an empty local only DDC
 - 2h45m to 5mxxs for Loading Reverb's P_World with an empty local only DDC
 - 17m29 to 10m27s for Loading Apollo_Terrain_Edit with an empty local only DDC

TESTS
 - Loading maps from Reverb, Fortnite, ShooterGame, QAGame, FortGPUTestbed
 - Content browser interactions while still under heavy compilation
 - Importing with Datasmith / Dataprep
 - Working with the new Mesh Modeling Tool
 - Shutting down the editor while loading
 - Most of EngineTest Test Suite

REFERENCES
 - Design https://docs.google.com/document/d/1O4GI1G9AtQN6l0SaGFfXw0DyNhlLunLoEqne5INvxIQ
 - Documentation https://docs.google.com/document/d/1KCdFEMhhcsGwfgOisTVwlOwtsmEd7qbB0V6Tc39Gb10

#rb Francis.Hurteau

[CL 14688146 by danny couture in ue5-main branch]
2020-11-09 07:50:34 -04:00
Marc Audy
4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00
danny couture
0bc26cdebe Reduce memory usage by allowing meshdescription and rawmesh bulkdata to be cleaned up if possible
Also add protection so meshdescription can be read from multiple threads in editor

 - Loading Reverb's P_World with empty DDC
    - 319GB to 242GB peak private byte
    - 166GB to 80GB permanent memory usage after map load

#rb Richard.Talbot-Watkins, Matt.Peters, Paul.Chipchase

[CL 14544739 by danny couture in ue5-main branch]
2020-10-22 10:35:43 -04:00
Zousar Shaker
77d13185b7 Copying //UE5/Dev-Cooker@14539516 to Main (//UE5/Main)
[CL 14539954 by Zousar Shaker in ue5-main branch]
2020-10-21 17:56:05 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
Marc Audy
7379fa99c5 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14229157
[CL 14233282 by Marc Audy in ue5-main branch]
2020-09-01 14:07:48 -04:00
Rune Stubbe
0d53893648 Nanite streaming:
-Moved processing to async thread
-Switched to much more efficient batched IO using the new IODispatch API
-Added fallback/legacy path for when IODispatch is disabled or not supported on the platform
-Changed page size back to 128KB (from 256KB) and doubled number of streaming pages
-256MB saving from smaller root pages. 32MB of those used for IO staging buffer
#rb graham.wihlidal
#fyi brian.karis

[CL 14110783 by Rune Stubbe in ue5-main branch]
2020-08-14 02:49:21 -04:00
Marc Audy
a7c9001a94 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14075166
#rb
#rnx

[CL 14075271 by Marc Audy in ue5-main branch]
2020-08-11 01:36:57 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
pj kack
6a096853e0 AsyncLoading2: Replace GlobalImports with PublicExports.
Move RefCount tracking for imports from import object level to package level.
Only track currently loaded public exports, and their packages.
Replace import object weak pointers with public export raw pointers (uobject index).
Add new NotifyUnreachableObjects GC hook to get information about all objects to be destroyed.
When a public export is destroyed, clean up its raw pointer, and mark its package as not loaded.
When a package is destroyed, clean up its ref count tracking data.

#rb per.larsson


#ushell-cherrypick of 13114335 by PJ.Kack

#ROBOMERGE-SOURCE: CL 13147624 via CL 13147625 via CL 13147626 via CL 13147627
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v688-13145358)

[CL 13147628 by pj kack in Main branch]
2020-05-04 09:14:12 -04:00
pj kack
5e49316bc4 AsyncLoading2: Fix incorrect check in ToPackageImport
#jira none
#rb none


#ushell-cherrypick of 12997588 by PJ.Kack

#ROBOMERGE-SOURCE: CL 12997796 in //UE4/Release-4.25Plus/... via CL 12997808
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12997823 by pj kack in Main branch]
2020-04-23 02:54:37 -04:00
carlmagnus nordin
373fd671f7 Copying //UE4/Release-4.25Plus-Dev to Release-4.25Plus (//UE4/Release-4.25Plus)
#rnx
#jira none
#rb none

#ROBOMERGE-OWNER: carlmagnus.nordin
#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 12973630 in //UE4/Release-4.25Plus/... via CL 12973644
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12973696 by carlmagnus nordin in Main branch]
2020-04-22 06:25:12 -04:00
paul chipchase
1773b3a77d Fix a typo in a newly added API method (IsInSeperateFile -> IsInSeparateFile) before the 4.25 release to avoid future issues.
#jira none
#rb devin.doucette, stefan.boberg
#lockdown stefan.boberg


#ushell-cherrypick of 12918250 by paul.chipchase

#ROBOMERGE-SOURCE: CL 12919209 in //UE4/Release-4.25Plus/... via CL 12919222
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12919263 by paul chipchase in Main branch]
2020-04-20 07:36:36 -04:00
carlmagnus nordin
1f16ffb0a7 Fixed static analysis warnings
#rnx
#robomerge[BOT1] Main-For-EngineMerge
#rb none
#jira UE-91433,UE-91436
#lockdown stefan.boberg

#ROBOMERGE-SOURCE: CL 12507055 in //UE4/Release-4.25Plus/... via CL 12507070
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12507091 by carlmagnus nordin in Main branch]
2020-04-01 11:48:27 -04:00
carlmagnus nordin
25e8b4dd7d Copying //UE4/Release-4.25Plus-Dev to Release-4.25Plus (//UE4/Release-4.25Plus)
#rnx
#robomerge[BOT1] Main-For-EngineMerge
#rb none
#jira none
#lockdown stefan.boberg

#ROBOMERGE-OWNER: carlmagnus.nordin
#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 12504704 in //UE4/Release-4.25Plus/... via CL 12504720
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12504759 by carlmagnus nordin in Main branch]
2020-04-01 05:00:26 -04:00
Eric Knapik
0b1dd07075 #Jira: none
Sets ArIsError and ArIsCriticalError to private

[at]Graeme.Thornton [at]Johan.Torp [at]Steve.Robb [at]Carlos.Cuello

#rb Steve.Robb
#ROBOMERGE-OWNER: Eric.Knapik
#ROBOMERGE-AUTHOR: eric.knapik
#ROBOMERGE-SOURCE: CL 11949030 via CL 11949058 via CL 11949116 via CL 11949174
#ROBOMERGE-BOT: (v656-11643781)

[CL 11953024 by Eric Knapik in Main branch]
2020-03-05 14:43:10 -05:00
Rolando Caloca
5b82f15def Copying //UE4/Dev-RenderPlat-Staging@11388153 to //UE4/Main
#rb none
#rnx

[CL 11388545 by Rolando Caloca in Main branch]
2020-02-12 13:27:19 -05:00
robert manuszewski
b938e59c9b Reimplementing FProperty changes from //UE4/Main
+ Reimplemented FProperty related fixed from //UE4/Main:
CL#10791312, 10804850, 10851666, 10855122, 10855198, 10942138, 11030611, 11030639, 11032261, 11061515, 11136964,11138881, 11214238, 11214865

#rb none (previously reviewed in Dev-Core)
[FYI] Chris.Bunnner, Daniel.Lamb


#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 11302985 via CL 11303011 via CL 11303019
#ROBOMERGE-BOT: (v0-11244347)

[CL 11303183 by robert manuszewski in Main branch]
2020-02-10 08:06:56 -05:00
Josh Adams
aa9705149b Copying Private-LoadTimes-4.24 stream to Main. Biggest changes are in Materials/Shader memory freezing.
#rb none

[CL 11282608 by Josh Adams in Main branch]
2020-02-06 13:13:41 -05:00
Stefan Boberg
55a8b15f1f Copying //UE4/Dev-Core to Main (//UE4/Main)
#rb none

[CL 11258477 by Stefan Boberg in Main branch]
2020-02-05 14:26:36 -05:00
steve robb
0f03ba4bc4 Simplification of DiffMap checking code.
#rb trivial
#rnx


#ROBOMERGE-SOURCE: CL 11197857 via CL 11197864
#ROBOMERGE-BOT: (v640-11091645)

[CL 11198225 by steve robb in Main branch]
2020-01-31 14:02:50 -05:00
Rolando Caloca
f63a3e857e Merging //UE4/Main@11178322 to Dev-RenderPlat-Staging
#rnx
#rb none

[CL 11195678 by Rolando Caloca in Dev-RenderPlat-Staging branch]
2020-01-31 10:34:10 -05:00
paul chipchase
c68d8f8c43 Add support for memory mapped files to BulKData2 which will fix a crash when memory mapped animations have been enabled.
- Attempting to memory map inline data will give a log error(as the original implementation did but will not attempt to actually memory map it as it is very unlikely that inline data would have the correct alignment requirements for the operation to succeed so to keep the code simple we just serialize the inline data which was the existing fallback behaviour anyway.
- Added the memory mapping implementation as it's own method (MemoryMapBulkData) since we only need to support the non-inline case.
- Added a flag (bShouldForceLoad) that when true will force the BulkData2 data to be streamed in immediately. Currently used as a fallback if the memory mapping fails (all callers assume 100% success) but I made it generic enough that we could use it for something else if the use case occurs.
- This is a fairly quick fix to unblock testing, future work includes:
  - Reduce the added memory bloat (adding 2 additional pointers to BulkData2)
  - Implement copy/assignment of memory mapped BulkData (based on the above work)

#jira UE-85974
#rnx
#rb Per.Larsson

[CL 11194361 by paul chipchase in Main branch]
2020-01-31 06:51:54 -05:00