Commit Graph

6 Commits

Author SHA1 Message Date
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
richard talbotwatkin
e62b002625 Changes for allocating StaticMesh subobjects in a more thread-safe way.
Always construct a UMeshDescriptionBase as a default subobject of the MeshDescriptionBulkData object, which can be recycled each time a UMeshDescriptionBase is required for that LOD.
Put GC scope guards around NewObject<> allocations to avoid clashes with GC when allocated on a thread.
Also identified other static mesh subobjects which can be potentially created in cooking commandlets when GC is taking place.
#jira UE-109204
#jira UE-109439
[FYI] Danny.Couture

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

[CL 15535009 by richard talbotwatkin in ue5-main branch]
2021-02-25 18:14:04 -04:00
richard talbotwatkin
8647dbaed2 The MeshDescription object within the bulkdata is no longer marked as Transactable. All transactable changes must occur on the bulkdata itself, and these changes will be propagated to the cached MeshDescription, if one exists, during an undo/redo. Corrected BulkData serialize by only caching the MeshDescription from the BulkData if the archive is loading.
#jira UE-109248
#jira UE-109821

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

[CL 15530441 by richard talbotwatkin in ue5-main branch]
2021-02-25 13:25:49 -04:00
richard talbotwatkin
8e65eef33e Fixed issues with editor -game mode.
StaticMesh hi res source model bulk data is no longer a default subobject; instead it is instanced if it was not present in PostLoad, thus fixing issues with object name differences.
MeshDescriptionBaseBulkData is marked as NeedsLoadForEditorGame, as well as not needing load for client or server, so that it can be loaded correctly.
#jira UE-108938

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

[CL 15481116 by richard talbotwatkin in ue5-main branch]
2021-02-19 20:53:13 -04:00
richard talbotwatkin
0a06ce9d2b Declared UMeshDescriptionBaseBulkData an editor-only class by implementing NeedsLoadForClient/Server() returning false. This prevents it from being cooked.
Made the HiResSourceModel MeshDescriptionBulkData a regular default subobject, so that it is still valid in Editor -game builds.
#jira UE-108938
#rb Robert.Manuszewski

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

[CL 15471367 by richard talbotwatkin in ue5-main branch]
2021-02-19 09:24:38 -04:00
Richard TalbotWatkin
bf10d3336a Refactor of source model representation for static meshes.
- Moved source models related classes and implementation into separate files.
- Created a new UObject wrapper for holding mesh description bulk data; this is created as a transactable object inside a UStaticMesh.
- The cached mesh description is now an inner object of the bulk data wrapper; this allows transactions on the bulk data to affect the cached mesh.
- The static mesh SourceModels array can no longer be accessed directly: FStaticMeshSourceModel requires extra initialization before it should be used, so new LODs should be added through the static mesh API.
- Undo/redo is now fixed within the geometry tools
- Fixed regression where mesh description was being unpacked unnecessarily during transactions
- MeshDescription bulk data and its cached MeshDescriptions are now emptied prior to removing the UObject reference, in order to immediately free memory instead of needing to wait for garbage collection
- No more deadlocks when clearing or committing mesh descriptions during garbage collection
- Bulk data UObjects are constructed, where possible, at startup, in order to prevent it from happening during critical moments, e.g. during garbage collection or package saving.
#rb Danny.Couture, Alexis.Matte, Ryan.Schmidt

[CL 15420827 by Richard TalbotWatkin in ue5-main branch]
2021-02-16 15:14:02 -04:00