Commit Graph

684 Commits

Author SHA1 Message Date
Matt Peters
6895cee3ee EditorDomainSave - Strip bulk data from EditorDomain copies of packages. BulkData types in the EditorDomain have flags set to load the data from workspace domain version of the file.
#rb Paul.Chipchase
#rnx

[CL 15643329 by Matt Peters in ue5-main branch]
2021-03-08 14:13:00 -04:00
Marc Audy
8f73cd7fa9 Merge UE5/Release-Engine-Staging @ 15630841 to UE5/Main
This represents UE4/Main @ 15601601

[CL 15631170 by Marc Audy in ue5-main branch]
2021-03-05 19:27:14 -04:00
Zousar Shaker
c85c06f057 Revision 2 (with handling for uninitialized object references):
-Compile in lazy resolve functionality for editor binaries
-Add "-LazyResolveAllImports" commandline switch to allow lazy RESOLVE of all wrapped object references
  -Functionality confirmed: load default map in ShooterGame Editor, cook ShooterGame, load LumenReflectiveTest in FortGPUTestbed, load default map and P_Construct in Frosty
-Renamed "-DisableLoadingAllImports" to "-LazyLoadAllImports" commandline switch to allow lazy LOAD of all wrapped object references and ensured it works with AsyncLoading code path
  -Non functional when combined with lazy resolve - will be worked on afterwards
-Added CPU timing scopes to measure performance impact of lazy resolve

Fixed lazy resolve bugs:
-Ensure null check on an unresolved object reference resolves the object reference (a non-null unresolved reference can become a null resolved reference)
-Ensure hash of an unresolved object reference resolves the object reference and hashes the resultant address (otherwise we can't reliably ensure hash consistency in the face of object redirection or stale references)
-Avoid using package name hash internally as it immediately manifested in hash collisions on a moderately sized project
-Ensure StaticFindObjectFastInternal instead of StaticFindObjectFast to ensure we can find/resolve not fully loaded objects
-Ensure UObjectRedirectors are handled when resolving wrapped object pointers
-Ensure we handle the possibility that a package has been partially loaded and we may not find our target object within it because the object hasn't been created yet

Automated testing:
-Adding hash consistency and redirector resolve tests to ObjectPtr unit tests

#rb devin.doucette

[CL 15571874 by Zousar Shaker in ue5-main branch]
2021-03-02 14:39:53 -04:00
Yuriy ODonnell
6679906437 Fixed compile errors when static analyzer is enabled in Test configs.
Static analyzer always evaluates expressions in check(), despite DO_CHECK=0 due to implementation of check():

    #define check(expr) { CA_ASSUME(expr); }

If checked expression depends on something that's wrapped in `#if DO_CHECK`, it will produce a compile error. The fix is to add USING_CODE_ANALYSIS condition where applicable.

#robomerge Release-5.0-EarlyAccess
#rb Steve.Robb

[CL 15527660 by Yuriy ODonnell in ue5-main branch]
2021-02-25 08:57:17 -04:00
Zousar Shaker
0c60eda086 Editgrate-undo //UE5/Main/Engine/Source/Runtime/CoreUObject/... changelist 15514386 as it is suspected in a Frosty issue.
[CL 15524151 by Zousar Shaker in ue5-main branch]
2021-02-24 20:09:58 -04:00
Zousar Shaker
3470e2f356 -Compile in lazy resolve functionality for editor binaries
-Add "-LazyResolveAllImports" commandline switch to allow lazy RESOLVE of all wrapped object references
  -Functionality confirmed: load default map in ShooterGame Editor, cook ShooterGame, load LumenReflectiveTest in FortGPUTestbed, load default map and P_Construct in Frosty
-Renamed "-DisableLoadingAllImports" to "-LazyLoadAllImports" commandline switch to allow lazy LOAD of all wrapped object references and ensured it works with AsyncLoading code path
  -Non functional when combined with lazy resolve - will be worked on afterwards
-Added CPU timing scopes to measure performance impact of lazy resolve

Fixed lazy resolve bugs:
-Ensure null check on an unresolved object reference resolves the object reference (a non-null unresolved reference can become a null resolved reference)
-Ensure hash of an unresolved object reference resolves the object reference and hashes the resultant address (otherwise we can't reliably ensure hash consistency in the face of object redirection or stale references)
-Avoid using package name hash internally as it immediately manifested in hash collisions on a moderately sized project
-Ensure StaticFindObjectFastInternal instead of StaticFindObjectFast to ensure we can find/resolve not fully loaded objects
-Ensure UObjectRedirectors are handled when resolving wrapped object pointers
-Ensure we handle the possibility that a package has been partially loaded and we may not find our target object within it because the object hasn't been created yet

Automated testing:
-Adding hash consistency and redirector resolve tests to ObjectPtr unit tests

#rb devin.doucette

[CL 15514386 by Zousar Shaker in ue5-main branch]
2021-02-24 11:26:58 -04:00
Matt Peters
6b0166c2b5 FUntypedBulkData::Serialize: refactor to ensure that all options for BulkData location (Inline, end of file, various separate files) are supported in all serialization environments.
#rb Paul.Chipchase
#rnx

[CL 15507362 by Matt Peters in ue5-main branch]
2021-02-23 17:21:09 -04:00
sebastien lussier
4c26fc4c10 Fix non-unity build error in ArchiveCrc32.cpp
#rb trivial
#jira UE-109085

#ROBOMERGE-SOURCE: CL 15489762 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15489783 by sebastien lussier in ue5-main branch]
2021-02-22 11:24:17 -04:00
Sebastien Lussier
2aed158821 Removed FHashBuilderArchive, added FArchiveCrc32
#rb jeanfrancois.dube, patrick.enfedaque
#robomerge Release-5.0-EarlyAccess

[CL 15474543 by Sebastien Lussier in ue5-main branch]
2021-02-19 15:13:52 -04:00
Matt Peters
55210445cc Fix compile errors from IPackageResourceManager refactor if WITH_IOSTORE_IN_EDITOR.
#rb Per.Larsson
#rnx

[CL 15454465 by Matt Peters in ue5-main branch]
2021-02-18 13:21:18 -04:00
francis hurteau
74e2491115 Fix ArchiveUObject SerializeObjectPtr not updating pointers when modifying reference and the pointer to be set is nullptr
#jira UE-108422, UE-108456
#rb Zousar.Shaker

#ROBOMERGE-SOURCE: CL 15423084 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15423108 by francis hurteau in ue5-main branch]
2021-02-16 17:36:58 -04:00
Francis Hurteau
cfc1fe9f21 Narrow the GIsSavingPackage check that prevent object creation and FindObject calls to be restricted to the actual package being saved by using a temporary package flag
#rb Matt.Peters, Robert.Manuszewski

#ROBOMERGE-OWNER: Francis.Hurteau
#ROBOMERGE-AUTHOR: francis.hurteau
#ROBOMERGE-SOURCE: CL 15378239 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
#ROBOMERGE-CONFLICT from-shelf

[CL 15378989 by Francis Hurteau in ue5-main branch]
2021-02-10 15:37:45 -04:00
danny couture
7d7ddb5fcb Fix quadratic search into an array when there are many dependencies between packages
- 4m49s to 1m25s to load Chase_Frogger_P

#rb Francis.Hurteau

[CL 15375895 by danny couture in ue5-main branch]
2021-02-10 10:11:27 -04:00
Zousar Shaker
e03298fa73 Prototype Wrapped Object Pointers (ObjectHandle/ObjectPtr)
Fix another issue of an FArchive that serializes object references without deriving from FArchiveUObject.  This one affects serialization to/from text assets.  Confirmed I can export an asset containing object references to text format when the fields are of wrapped pointer type.  Comparing the resulting output to a text export of the same asset when the fields are raw pointers show no diffs aside from Guid and Localization which are shown to vary from export-to-export or editor session to editor session.

NOTE: Unlike lazy/soft/weak pointers, I want serialization of wrapped pointers to match serialization of raw pointers, so I don't create a separate indexed array for it in the text output, it goes into the same "Objects" array as raw object pointers.

#rb devin.doucette
#fyi graeme.thornton

[CL 15201151 by Zousar Shaker in ue5-main branch]
2021-01-26 02:45:51 -04:00
Zousar Shaker
2fc47a2cf0 Prototype Wrapped Object Pointers (ObjectHandle/ObjectPtr)
Address the following serialization issues:

1) Ensure ObjectPtr Property can convert from SoftObjectProperty and anything else that Object Property can convert from by removing its ConvertFromType override.
2) Fix serialization of wrapped pointers through archives that don't derive from FArchiveUObject, but still expect to be able to serialize both raw and wrapped object references (FNetBitWriter, FExportArchive, and FObjectAndNameAsStringProxyArchive).
3) Restore assert in base FArchive serialization of wrapped object pointer which I had erroneously made in CL15130804 now that it is clear that it is not safe to be relying on silently not writing/reading a wrapped object pointer (even if that may be the default behavior for a raw pointer).
4) Bump Niagara custom version guid to avoid issues with incorrectly serialized data in DDC.

#jira UE-106943
#rb devin.doucette
#fyi rob.krajcarski

[CL 15178163 by Zousar Shaker in ue5-main branch]
2021-01-25 11:37:56 -04:00
Marc Audy
bc88b73a29 Merge Release-Engine-Staging to Main @ CL# 15151250
Represents UE4/Main @ 15133763

[CL 15158774 by Marc Audy in ue5-main branch]
2021-01-21 16:22:06 -04:00
Per Larsson
68ef26c161 Extract package store interface from I/O store package loader
#rb PJ.Kack, CarlMagnus.Nordin
#jira none

[CL 15146443 by Per Larsson in ue5-main branch]
2021-01-20 14:04:27 -04:00
CarlMagnus Nordin
c565398bdd IoDispatcher: Added support for external backends
#rnx
#rb pj.kack, per.larsson

[CL 15134585 by CarlMagnus Nordin in ue5-main branch]
2021-01-19 04:39:56 -04:00
Marc Audy
bf80889353 UE5/Release-Engine-Staging to UE5/Main
This represents UE4/Main up to CL# 14958402

[CL 15028197 by Marc Audy in ue5-main branch]
2021-01-08 19:56:07 -04:00
Marc Audy
f1c8402c96 Fix non-unity
[CL 14969798 by Marc Audy in ue5-main branch]
2020-12-31 14:45:42 -04:00
Marc Audy
ada7c144fa Merge //UE5/Release-Engine-Staging @14903491 to //UE5/Main
[CL 14906022 by Marc Audy in ue5-main branch]
2020-12-11 14:21:20 -04:00
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
Marc Audy
a7f9391231 Merge UE5/Release-Engine-Staging @ 14811410 to UE5/Main
This represents UE4/Main @ 14768117

For ReleaseObjectVersion.h
#lockdown Marcus.Wassmer

[CL 14811440 by Marc Audy in ue5-main branch]
2020-11-24 18:42:39 -04:00
Martin Ridgers
be972be826 Moved the Trace namespace into the UE namespace.
#rb jb
#rnx

[CL 14762673 by Martin Ridgers in ue5-main branch]
2020-11-17 06:54:28 -04:00