Commit Graph

3622 Commits

Author SHA1 Message Date
matt peters
b9be0036df #jira UE-132874
#jira UE-132939
LargeMemoryArchive::ReleaseOwnership() sets TotalSize() to 0, so TotalSize must be called before calling ReleaseOwnership. Calling them both as arguments into a function was succeeding on some compilers and failing on others due to compiler optimization differences.
#rb Zousar.Shaker
#rnx
#[fyi] Francis.Hurteau

#ushell-cherrypick of 17947411 by Matt.Peters

#ROBOMERGE-AUTHOR: matt.peters
#ROBOMERGE-SOURCE: CL 18008712 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 18008728 by matt peters in ue5-release-engine-test branch]
2021-11-01 17:20:22 -04:00
geoff evans
c4aafd93b4 Fix warning reporting issue about file not existing
#jira none
#rb Geoff.Evans

#ushell-cherrypick of 17947801 by Brandon.Schaefer

#ROBOMERGE-AUTHOR: geoff.evans
#ROBOMERGE-SOURCE: CL 18006507 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 18006562 by geoff evans in ue5-release-engine-test branch]
2021-11-01 15:05:33 -04:00
geoff evans
c9fef739b0 Do not exit early if no file on the path
#jira none
#rb Josh.Adams

#ushell-cherrypick of 17947764 by Brandon.Schaefer

#ROBOMERGE-AUTHOR: geoff.evans
#ROBOMERGE-SOURCE: CL 18006480 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 18006500 by geoff evans in ue5-release-engine-test branch]
2021-11-01 15:02:28 -04:00
george rolfe
e597577034 StaticClassProvider & StaticStructProvider concepts, and replaced functionality in two dependent files
#jira UE-133246
#preflight 617be019c44dc5000165e827
#rb steve.robb

#ROBOMERGE-AUTHOR: george.rolfe
#ROBOMERGE-SOURCE: CL 17991327 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 17991335 by george rolfe in ue5-release-engine-test branch]
2021-10-29 22:22:08 -04:00
michael balzer
5fe14fd7d9 Add ValidEnumValues to PropertyMetadata enums (this does NOT introduce a new property metadata specifier, but rather just increase its visibility)
#rb trivial
#preflight 6179c8450fb8310001be2441
#rnx none

#ROBOMERGE-AUTHOR: michael.balzer
#ROBOMERGE-SOURCE: CL 17955798 in //UE5/Release-5.0/... via CL 17955807
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17955810 by michael balzer in ue5-release-engine-test branch]
2021-10-27 20:37:36 -04:00
marc audy
7f1121e10e Temporarily backout TheSameLayout fix while investigating why anim code relied on incorrect behavior
#jira

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-COMMAND: _robomerge ue5-main
#ROBOMERGE-SOURCE: CL 17938338 via CL 17938352 via CL 17938360 via CL 17938363 via CL 17938366
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17939037 by marc audy in ue5-release-engine-test branch]
2021-10-26 20:38:45 -04:00
marc audy
cf37cd623f Fix FStructUtils::TheSameLayout returning false when passed null structs. This fixes a regression introduced by sparse class data changes (CL# 16048941).
#jira UE-132711
#rb Michael.Noland, Phillip.Kavan

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 17935420 in //UE5/Release-5.0/... via CL 17935647
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17935668 by marc audy in ue5-release-engine-test branch]
2021-10-26 17:23:10 -04:00
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
francis hurteau
bc0a1cda3e Fixed non unity compilation error from missing include
#jira UE-132151
#rb trivial
[CODEREVIEW] Steve.Robb

#ROBOMERGE-AUTHOR: francis.hurteau
#ROBOMERGE-SOURCE: CL 17864878 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v883-17842818)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17864914 by francis hurteau in ue5-release-engine-test branch]
2021-10-19 15:38:32 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
matt peters
6e92e269a9 AsyncLoading2 now calls FCoreUObjectDelegates::OnAssetLoaded when WITH_IOSTORE_IN_EDITOR is set
FCoreUObjectDelegates::OnEndLoadPackage:
Fix the implementation in AsyncLoading1 to handle recursive loads; FAsyncPackage->PackageObjLoaded includes UObjects loaded from packages that were import dependencies of the package, and we need to send OnEndLoadPackage for those as well.

Also filter out the transient package and script and memory packages from all OnEndLoadPackage calls; this was affecting all three of AsyncLoading1, AsyncLoading2, and UObjectGlobals.

Did some comment improvement and removal of dead code in AsyncLoading1 while I was working in the area.

#ushell-cherrypick of 17686607 by jamie.dale
#ushell-cherrypick of 17734361 by Matt.Peters
#rb None, cherrypick
#rnx

#ROBOMERGE-AUTHOR: matt.peters
#ROBOMERGE-SOURCE: CL 17735351 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17735376 by matt peters in ue5-release-engine-test branch]
2021-10-06 10:42:13 -04:00
christina tempelaarl
7690581940 Update LevelEditor TRS gizmo to handle Editor mode and coord system changes.
#jira UETOOL-4297
#rb brooke.hubert
#preflight 615c9daaed17cd000199c52c

#ROBOMERGE-AUTHOR: christina.tempelaarl
#ROBOMERGE-SOURCE: CL 17726964 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17726989 by christina tempelaarl in ue5-release-engine-test branch]
2021-10-05 16:34:35 -04:00
paul chipchase
623c7eafe6 Clean up some minor code comments.
#rb trivial
#rnx
#preflight 615af751e3b24d00014c878a

- Cleaned up some of the code comments documenting the utility macros and functions.
- Removed ::IsIoDispatcherEnabled as it was no longer used.

#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 17707280 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17707296 by paul chipchase in ue5-release-engine-test branch]
2021-10-04 09:42:15 -04:00
paul chipchase
ecd1bc0f16 Add a table of contents detailing the payload layout in a package providing an easy way to find info about all payloads in a package file.
#rb CarlMagnus.Nordin
#jira none
#rnx
#preflight 6156eabd7b2a62000169d451

### Current Changes
- By storing the location of the toc in the package file summary we can access the toc by reading the summary and then jumping to it. It should also be possible for external scripts to be able to do this as well.
- We currently store the identifier, the offset into the package file and the uncompressed size of payload, which will be stored in FCompressedBuffer format.
-- We don't need all this info right now but it means that the structure will be compatible with the experimental sidecar feature. It would also (hypothetically) allow us to move the offset/size info from the bulkdata objects themselves and simply rely on the toc, in which case the loading from within the package file or a sidecar file will be the same.
- When saving a package's exports we will gather a reference to each virtualized bulkdata serialized. The toc should appear before the payloads in the file but we do not know the correct info for the toc until after the payloads have been appended to the package file. So we need to write out a dummy toc that will reserve the space in the file and then after we have appended the payloads, seek back in the file and write out the correct info.

### Future Work
- Although this CL does have a number of code changes to allow this to work with text based assets there are some problems with how that format is currently saved which will prevent it from working (and currently prevents VBD from working with it as well). This will be fixed as a separate issue.
- The experimental sidecar feature uses FTocEntry but serializes a TArray to disk. This should be updated to use FPayloadToc in a later submit.

#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 17690578 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17690585 by paul chipchase in ue5-release-engine-test branch]
2021-10-01 08:18:58 -04:00
jeanmichel dignard
7778a87149 Added copy and move operators to FGCObject, to go along the already existing copy and move constructors.
They are empty as the value of bReferenceAdded shouldn't be copied from one instance to another as each instance needs to register itself.

#rb Steve.Robb
#preflight 6155c40c260f7d0001302c45

#ROBOMERGE-AUTHOR: jeanmichel.dignard
#ROBOMERGE-SOURCE: CL 17678459 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)

[CL 17678487 by jeanmichel dignard in ue5-release-engine-test branch]
2021-09-30 11:25:27 -04:00
carlmagnus nordin
e6c7bce3ee Remove unused names from package headers, reducing the amount of data and number of names that have to be serialzed
* Strip names that are not used when cooking for UPS
* Strip names that are not used by the loader when staging for IoStore

#preflight 615424b7f4d2a4000107be68, 615450a875fae600010d4820
#rb pj.kack, francis.hurteau

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 17674004 in //UE5/Release-5.0/... via CL 17674013
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v875-17642767)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17674014 by carlmagnus nordin in ue5-release-engine-test branch]
2021-09-30 02:05:41 -04:00
paul chipchase
aa41cf1ed2 Fix false positives when checking if a payload loaded from disk is corrupt or not.
#rb Devin.Doucette
[FYI] Nick.Darnell
#jira UE-129792
#rnx
#tests Loaded production map in editor (cold DDC), full EngineTest cook, retested the original use case for CL 17648118

### Problem
- If a virtualized bulkdata object, created from an old bulkdata object (so that the content id was derived from the old guid rather than the hash of the payload content) , was forced into memory by having it's loader reset, it incorrectly have it's LegacyKeyWasGuidDerived flag removed.
- The flag was removed because we'd assign the newly loaded payload via ::UpdatePayloadImpl which assumes that the provided FPayloadId is correct, but in this case it will not be (it's still derived from the old guid) and given that in most use cases the bulkdata will be destroyed after this call (making loading it from disk a bit pointless, but we currently need to do so for safety) we do not want to pay the cost of hashing the payload at this point.
- If the payload was then accessed then the corruption check would fail as we would assume that the content id should match the hash found in the FCompressedBuffer.

### The Fix
- Instead of calling ::UpdatePayloadImpl when detaching the virtualized bulkdata from disk we now just assign it directly and remove the flags/members relating to disk access.
- Added a cpu trace scope to ::DetachFromDisk as it would be great to find out how much time we are wasting here.
- I also noticed that when ::DetachFromDisk is called, we would not remove the links to the file on disk if bEnsurePayloadIsLoaded was true which will now be fixed as well.
- Since there is no easy way for a user to fix this mismatch and it would only be a problem for them if virtualization is enabled I have reduced the validation severity to a warning rather than error/fatal error until I can provide a way for a package to be 'fixed' so people don't waste work.

#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 17667806 via CL 17667845 via CL 17667866 via CL 17667872 via CL 17668025
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v875-17642767)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17668041 by paul chipchase in ue5-release-engine-test branch]
2021-09-29 17:21:08 -04:00
zousar shaker
a1facadff3 Do not check for end-of-file tag when loading unversioned assets from the editor domain.
#rb devin.doucette
#jira FORT-413156

#ushell-cherrypick of 17654054 by Zousar.Shaker

#ROBOMERGE-AUTHOR: zousar.shaker
#ROBOMERGE-SOURCE: CL 17663312 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)

[CL 17663361 by zousar shaker in ue5-release-engine-test branch]
2021-09-29 12:37:25 -04:00
patrick enfedaque
c8e868ac2a WorldPartition: Template/SaveAs support
#rb richard.malo, jeanfrancois.dube
#preflight 61545b81d46076000188ca69

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 17660903 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)

[CL 17660908 by patrick enfedaque in ue5-release-engine-test branch]
2021-09-29 09:40:02 -04:00
paul chipchase
e2ba2ad071 Fix potential crash when syncing textures from within the editor.
#rb Danny Couture
#rnx

### Problem
- The crash would occur when the texture being since contains a reference to another texture (via composite) which is also in need of syncing on the users machine.
- After the files on disk have been updated the current packages are reloaded but the original version of the texture will still be in memory when the composite texture notifies that it has been reloaded causing a texture compilation job with the older now invalid texture.
-- VirtualizedBulkData relied on out of date packages not trying to access their payloads on disk once the file has been changed, but with the above scenario it was possible. There could also be other paths causing this (even if the access of out of date package payloads at this point is a waste of time)

### Fix
- The virtualized bulkdata objects now reference themselves with the FLinkerLoader if the payload is on disk, just as the old bulkdata system did. When file changing operations are invoked, the FLinkerLoader will inform it's referenced bulkdata to load the payloads off disk and hold them in memory.
-- Note that virtualized bulkdata was trying to avoid this memory bloat by design, but if we cannot be certain that the bulkdata will not try to access the payload after the file changes (as was thought) then we must take the payload into memory.
- Added a log message to VBD if we detect that the loaded payload does not match the VBD members expectations. This log message can either be an error or a fatal error depending on the define 'VBD_CORRUPTED_PAYLOAD_IS_FATAL' (defaulted to on)
- The registration to FLinkerLoader can be easily disabled by setting the define 'VBD_ALLOW_LINKERLOADER_ATTACHMENT' to 0

### Outstanding Issues
- Cloned bulkdata objects (via assignment) do not currently register themselves to the FLinkerLoader (the old bulkdata system did not) if we were to add this then we need to make sure that the FLinkerLoader registration is thread safe. This should be done as a separate work item so that we can unblock the current workflows that this changelist addresses.
-- Note that if we did not update cloned bulkdata to work with this system then we could drop the registration and just iterate over the package's bulkdata and force them to load into memory when required. However that would leave the cloned virtual bulkdata in an uncertain state and is not desirable.
- When saving a package, the virtualized bulkdata objects that it contains will change their members so that future payload access can come from the newly saved files, where as the old bulkdata system would force the payload to remain in memory for the rest of the editor session. If we want to keep this then we will need to try and make sure that the newly updated bulkdata can be registered so that it receives future notifications about the file being changed.

#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 17648118 via CL 17648147 via CL 17648161 via CL 17648163 via CL 17648175
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v875-17642767)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17648184 by paul chipchase in ue5-release-engine-test branch]
2021-09-28 13:05:01 -04:00
carlmagnus nordin
51c9794dea PackageStore refactor
* Decouple container concept from IoDispatcher
* Decoiuple PackageStore implementation from AsyncLoading2
* Restore ucas unmount fix that got kist when merrging from UE4
* Fix packages being left in the PackageStiore even after unmounting contaiiners

#rnx
#rb pj.kack, per.larsson
#preflight 61520cc52afc2d0001146ce7

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 17641845 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v874-17637634)

[CL 17642353 by carlmagnus nordin in ue5-release-engine-test branch]
2021-09-28 04:00:33 -04:00
aurel cordonnier
69fe095547 Merge from Release-Engine-Staging @ 17636544 to Release-Engine-Test
This represents UE4/Main @17638339 and Dev-PerfTest @17636504

[CL 17638842 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-27 19:54:25 -04:00
matt peters
3610205880 FAsyncPackage::FlushObjectLinkerCache: Optimize by calling FlushCache once per linker instead of once per object.
#rb PJ.Kack
#jira None, Slack
#rnx

#ushell-cherrypick of 17597448 by Matt.Peters

#ROBOMERGE-AUTHOR: matt.peters
#ROBOMERGE-SOURCE: CL 17628975 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17628980 by matt peters in ue5-release-engine-test branch]
2021-09-27 07:31:45 -04:00
matt peters
86442fc293 Optimize FPackageLocalizationCache::ConditionalUpdateCache
1) Batch up calls to AssetRegistry->GetAssetsByPath instead of calling it once per plugin, as the function has a high overhead.
2) Remove trace scope from UE:AssetRegistry FFiltering::ShouldSkipAsset as the function is called very frequently (large projects can have a million assets).

#rb Francis.Hurteau, Jamie.Dale
#rnx
#jira None, slack thread

#ushell-cherrypick of 17591138 by Matt.Peters

#ROBOMERGE-AUTHOR: matt.peters
#ROBOMERGE-SOURCE: CL 17628939 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17628957 by matt peters in ue5-release-engine-test branch]
2021-09-27 07:27:26 -04:00
michael noland
0cda7da7d4 Partial pass of fixing type truncation warnings in CoreUObject
#jira UE-127233
#rb Devin.Doucett

#ROBOMERGE-OWNER: michael.noland
#ROBOMERGE-AUTHOR: michael.noland
#ROBOMERGE-SOURCE: CL 17618902 in //UE5/Release-5.0/... via CL 17618928
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v871-17566257)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17618930 by michael noland in ue5-release-engine-test branch]
2021-09-24 00:31:55 -04:00