Commit Graph

702 Commits

Author SHA1 Message Date
Jamie Dale
4afb7ce6bb Made EName an enum class to prevent implicit conversion to int
The following code would call the int overload rather than the name overload when passed an EName constant, which could easily lead to confusion and bugs:
    using FMyId = uint8;
    void DoThing(FName);
    void DoThing(FMyId);
    DoThing(NAME_Actor);

The change to use enum class requires that any code that actually deals with EName as an int (mostly internal name code and serialisation) be updated to explicitly cast, but prevents the implicit conversion that causes the issue above.

In order to preserve the NAME_X aliases that the old-style enum added to the global scope, new aliases have been added that point to the EName scoped versions. Unfortunately these can cause shadowing warnings if NAME_X is defined in the local scope, as the old-style enum used to allow that without shadowing, however there is no way to prevent this so we'll just need to fix any warnings that occur.

#rb Johan.Torp
#preflight 6087e06349a9840001414708

[CL 16126708 by Jamie Dale in ue5-main branch]
2021-04-27 10:11:18 -04:00
Matt Peters
3a33553aad Fix AsyncLoadPackage's error handling to call the completion delegate with the requested package name instead of NAME_None when the packagename is invalid.
#rb CarlMagnus.Nordin
#rnx

[CL 16061452 by Matt Peters in ue5-main branch]
2021-04-20 10:47:23 -04:00
PJ Kack
50cd6737f9 AsyncLoading2: Improve overlap of ALT and GT work for data sets with expensive PostLoad to reduce wall times when flushing async loading.
Interleave polling of packages in external read queue with processing of normal work queue nodes.

#rb per.larsson, carlmagnus.nordin
#rnx

[CL 16049103 by PJ Kack in ue5-main branch]
2021-04-19 05:52:42 -04:00
mark lintott
2fa0ec20f0 Removal of UE4 references from code base
#rb trivial

[CL 16005742 by mark lintott in ue5-main branch]
2021-04-14 11:13:44 -04:00
mark lintott
bd61859350 #jira 112822
#rb johan.torp
Removal of UE4 references in Archive.h

[CL 16002350 by mark lintott in ue5-main branch]
2021-04-14 05:14:13 -04:00
Johan Torp
05d8fbeea3 Reduce EDLBootNotificationManager allocations during early editor startup
#rb matt.peters

[CL 15987949 by Johan Torp in ue5-main branch]
2021-04-13 07:38:30 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
paul chipchase
3e95ae2c21 Remove the bulkdata manifest that was generated when cooking.
- The manifest was for a prototype version of the IoStore commandlet and would attempt to record every bulkdata entry during a cook, which would allow us to generate the FioChunkId for each bulkdata entry when building the ucas files.
- Due to changes during development we stopped requiring this data and it was never used in actual production code.
- Since this code was never in use we can just remove it.

* IoStoreUtilities
- No longer attempt to load the manifest
- Removed use of BulkdataTypeToChunkIdType and just use the EIoChunkType directly instead.

#rb CarlMagnus.Nordin
#jira UE-112697
#test Full stage of ShooterGame
#rnx
#preflight 606f039028671300019c806a

[CL 15954210 by paul chipchase in ue5-main branch]
2021-04-08 10:10:34 -04:00
mark lintott
24420693b6 #jira UE-111195
Updated references to UE4 to Unreal in NetworkFileConnection.cpp
This required references to GPackageFileUE4Version and GPackageFileLicenseeUE4Version to also be updated to GPackageFileUnrealVersion and GPackageFileLicenseeUnrealVersion accordingly

#ROBOMERGE-SOURCE: CL 15850452 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15851651 by mark lintott in ue5-main branch]
2021-03-29 11:38:01 -04:00
Matt Peters
fd97028c28 Change presave prototype to take an FObjectSaveContextRef to provide more information about the save parameters.
#rb Francis.Hurteau, Devin.Doucette
#rn Minor Cooking

[CL 15831839 by Matt Peters in ue5-main branch]
2021-03-25 16:51:36 -04:00
Zousar Shaker
bdee27c124 Systematic changes needed for SoundCue and SoundWave to successfully lazy load in editor in most circumstances when using the -LazyLoadImports commandline switch.
Changes control of the feature to uniformly require the -LazyLoadImports commandline switch.
Ensures that serialization of ObjectPtr fields for blueprints doesn't differ between raw pointer (Object) fields.  INSTANCES of these types were already serialized identically (wrote out the same type identifier in tagged property serialization), but the serialized type descriptors (used by blueprints) write out the FFieldClass::GetName, and that differed between FObjectProperty and FObjectPtrProperty, and this change addresses that discrepancy.
Allow ObjectPtr fields to be instantiated in place of Object fields in script/blueprint in editor builds while ensuring that they are serialization compatible and considered equal types.

#rb francis.hurteau
#rb marc.audy
#fyi devin.doucette
#fyi robert.manuszewski
#preflight 605cbf325e87c40001b74f5b

[CL 15827275 by Zousar Shaker in ue5-main branch]
2021-03-25 13:53:42 -04:00
danny couture
9ea3d0e9a2 Change the lockstatus after the detach to avoid tripping the new DetachBulkData check
#rb Yuriy.ODonnell
#robomerge Release-5.0-EarlyAccess

[CL 15804511 by danny couture in ue5-main branch]
2021-03-24 14:14:57 -04:00
danny couture
6cc6eb12ad Add check to make sure we never try to detach a bulkdata that is being used
#fyi Yuriy.ODonnell
#rb Francis.Hurteau
#robomerge Release-5.0-EarlyAccess

[CL 15796024 by danny couture in ue5-main branch]
2021-03-24 06:59:27 -04:00
Marc Audy
0cbbc781ca Merge UE5/Release-Engine-Staging @ 15740152 to UE5/Main
This represents UE4/Main @ 15709114

[CL 15740605 by Marc Audy in ue5-main branch]
2021-03-18 15:20:03 -04:00
Matt Peters
57d4112207 Clear the LazyLoadable flag when clearing or setting the bulk data, as the bulkdata bytes no longer match the data on disk.
This fixes a mismatch between bulkdata flags and the bulkdata payload that occurred when loading a package from the EditorDomain that was saved with BULKData_WorkspaceDomainPayload even though the bulkdata was modified in memory on load.
#rb Paul.Chipchase
#rnx

[CL 15737049 by Matt Peters in ue5-main branch]
2021-03-18 08:36:33 -04:00
Zousar Shaker
074137abf5 Avoid resolving wrapped object pointer references when serializing to archive for memory counting purposes.
#rb devin.doucette
#preflight 60511dc194e6100001bf6338

[CL 15715895 by Zousar Shaker in ue5-main branch]
2021-03-16 17:53:58 -04:00
CarlMagnus Nordin
6c4ec983e1 UnrealInsights: Fixed missing package names when using the new loader
#jira UE-110428

[CL 15694909 by CarlMagnus Nordin in ue5-main branch]
2021-03-15 06:41:39 -04:00
Matt Peters
a8894e3fec UnversionedPropertySerialization: Support unversioned in uncooked packages so that EditorDomain can use it.
#rb Johan.Torp
#rnx

[CL 15681627 by Matt Peters in ue5-main branch]
2021-03-11 17:57:46 -04:00
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