Commit Graph

1553 Commits

Author SHA1 Message Date
Josh Adams
613180ea74 - Added ability for UObject to override the section name it uses for config properties. This is useful for moving a config class to another module, but still allowing back compatibility. The new name cannot be used in the .ini, only the old names can be used.
#rb brandon.schaefer

[CL 14824206 by Josh Adams in ue5-main branch]
2020-11-30 18:18:29 -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
Francis Hurteau
a2dc080863 Fixed Save2 when using unversioned serialization where the archive were properly set up but the necessary associated package flag was missing
Changed Save2 to use the old import sorting algo to keep binary consistent between the new and old save algo

Encapsulated "UseUnversionedPropertySerialization" in LinkerSave to set both the archive mode and the necessary package flag
Moved FObjectImportSortHelper to SavePackageUtilities
Cache "s.ProcessPrestreamingRequests" for Save2

#rb Matt.Peters

[CL 14790090 by Francis Hurteau in ue5-main branch]
2020-11-19 16:03:52 -04:00
Jamie Dale
f9db154c26 Allow a Reset TStrongObjectPtr to be destroyed during static de-init on Mac
On Mac the Main thread isn't the Game thread, so this trips the assert in ~FInternalReferenceCollector(), even if the TStrongObjectPtr has been manually Reset prior.

#jira UE-101794
#fyi Alexis.Matte
#rb Steve.Robb

[CL 14787366 by Jamie Dale in ue5-main branch]
2020-11-19 12:23:16 -04:00
sebastian nordgren
e1c8c29475 Added check for ArrayIndex >= 0 in Container*PtrToValuePtrInternal, because the pointer math can access invalid memory if negative.
This isn't related to any particular bug, but while debugging I found myself confirming that this was not the case - especially since INDEX_NONE may appear to be a valid value for ArrayIndex.

#rb paul.chipchase

[CL 14774958 by sebastian nordgren in ue5-main branch]
2020-11-18 10:08:43 -04:00
Zousar Shaker
3cdeeb8075 Prototype Wrapped Object Pointers (ObjectHandle/ObjectPtr) Change ternary operators that are ambiguous when TObjectPtr can be implicitly constructed from a raw pointer. Also allow TObjectPtr to be implicitly constructed from an appropriate raw pointer.
#rb devin.doucette

[CL 14739879 by Zousar Shaker in ue5-main branch]
2020-11-12 18:18:02 -04:00
Christina TempelaarL
a9dd09fc9a Fixed blueprint nativization for SplineComponents/FInterpCurvePoints.
#jira UE-67542
#rb phillip.kavan

[CL 14713419 by Christina TempelaarL in ue5-main branch]
2020-11-10 17:16:52 -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
Devin Doucette
c9f320e334 SharedBuffer: Extended shared buffer with an optional outer buffer and optional buffer owner
MakeView now has overloads that accept an outer shared buffer that it will hold a reference to and inherit the read-only state from. The view must be contained by the outer shared buffer.

TakeOwnership now has overloads that accept an instance of a type derived from FSharedBuffer::FBufferOwner that will be moved and stored to manage the lifetime of the buffer when a delete function is insufficient.

Functions that create buffers now return pointers instead of references, for more optimal reference counting. ToSharedRef can be called on the return value to convert it to a reference in cases where that is useful.

#jira none
#rb Zousar.Shaker
#rnx

[CL 14680479 by Devin Doucette in ue5-main branch]
2020-11-06 16:01:46 -04:00
daren cheng
4ec48c9820 Edigrate 14629275.
Capture callstack in widget invalidation for leaf widgets.

#jira UE-101687
#rb Patrick.Boutot Phillip.Kavan

[CL 14631340 by daren cheng in ue5-main branch]
2020-11-02 14:48:49 -04:00
Zousar Shaker
7b6269efb4 Enable package access tracking for use in cook-time dependency tracking.
#rb trivial

[CL 14629528 by Zousar Shaker in ue5-main branch]
2020-11-02 13:35:35 -04:00
Zousar Shaker
5fc6103944 New call-site and systematic upgrades needed in Main stream for Engine+ShooterGame scalar property upgrades to Wrapped Object Pointers.
#rb devin.doucette

[CL 14629475 by Zousar Shaker in ue5-main branch]
2020-11-02 13:28:33 -04:00
Marc Audy
68150e0be7 Merge UE5/Release-Engine-Staging to UE5/Main @ 14611496
This represents UE4/Main @ 14594913

[CL 14612291 by Marc Audy in ue5-main branch]
2020-10-29 13:38:15 -04:00
devin doucette
e1f56b47b2 SharedBuffer: Rewrote SharedBuffer to make it easier to use and support immutable buffers
#jira none
#rb Zousar.Shaker, Paul.Chipchase
#rnx

[CL 14581997 by devin doucette in ue5-main branch]
2020-10-26 17:32:41 -04:00
Zousar Shaker
2ccd540c86 Avoid warning emitted from IncludeTool by keeping FObjectPtr a 'using' in all configurations.
#rb devin.doucette

[CL 14556317 by Zousar Shaker in ue5-main branch]
2020-10-23 11:12:09 -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
Jon Nabozny
d803af861d Make sure that FastArrays using Struct Delta Serialization always resend unacknowledged properties.
This fixes a regression in behavior where structs may receive partial updates due to NAKs.

#jira UE-101061
#review-14481580 @Brian.Bekich
#rb Brian.Bekich

[CL 14486636 by Jon Nabozny in ue5-main branch]
2020-10-13 19:07:58 -04:00
Matt Peters
af0eb8bc7b GetPackageLinker - reduce complexity by removing deprecated code paths and merging duplicate blocks.
The new function is equivalent for all cases except the cases below (which were already deprecated):

Case) An InOuter was provided with no InLongPackageName, and the InOuter had no existing linker, and the InOuter is a Memory-only package, and a file exists on disk with the same path.
Change) The previous version would have called CreateLinker with the filename from disk; the new version will silently skip the CreateLinker call and return nullptr.

Case) Load_AllowDll package flag was set, and an InOuter was provided with no InLongPackageName, and the InOuter had no existing linker, and the file did not exist on disk.
Change) The previous version would have silently returned nullptr; the new version will issue a warning and return nullptr.

Case) Load_NoWarn or Load_Quiet was provided, and an InOuter was provided with no InLongPackageName, and the InOuter had no existing linker, and the file did not exist on disk.
Change) The previous version would have issued a warning and returned nullptr; the new version will silently return nullptr.

Case) An InOuter was provided, and an InLongPackageName was provided, and the InOuter had no existing linker, and no package existed for the (possibly redirected) InLongPackageName.
Change) The previous version would have created an unused package with name InLongPackageName, and then called CreateLinker on the InOuter; the new version will not create the unused package.

Case) An InOutLoadContext is provided that is not equal to FUObjectThreadContext::Get().GetSerializeContext() and we reach the call to CreateLinker.
Change) The previous version would have passed FUObjectThreadContext::Get().GetSerializeContext() to CreateLinker; the new version will pass InOutLoadContext.
Note) This case does not currently exist in any callsite in the Engine; they all pass nullptr or FUObjectThreadContext::Get().GetSerializeContext() for the InOutLoadContext.

Case) An InOuter was not provided, and a CompatabilityGuid was provided, and a package and linker already exists in memory for the given name, and the guid on disk for the packagename matches the CompatabilityGuid, but the guid from the linker in memory does not.
Change) The previous version would have returned nullptr; the new version will ignore the mismatch and return the linker in memory.

#rb Francis.Hurteau, Robert.Manuszewski
#rnx

[CL 14480063 by Matt Peters in ue5-main branch]
2020-10-13 11:09:21 -04:00
Marc Audy
50a3d7d368 Merge Release-Engine-Staging to Main @ CL# 14467590
This represents UE4/Main @ 14432125 + some cherrypick fixes

[CL 14468207 by Marc Audy in ue5-main branch]
2020-10-09 22:42:26 -04:00
Marc Audy
ffa6d55e45 Modify FObjectInitializer to allow nested subobjects to be overriden
Fix subobject overriding in the case of a required subobject that has been both overriden for class and marked do not create. Previously it was ending up with the default subobject type rather than the valid overriden value.
Create an EngineTest that validates all expectations for subobjects and nested subobject overrides
#rb Dan.OConnor

[CL 14425910 by Marc Audy in ue5-main branch]
2020-10-05 19:30:44 -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