Commit Graph

343 Commits

Author SHA1 Message Date
matt breindel
4e571b1895 Adding an API to FRedirectCollector to provide read access to the global list of discovered asset redirects.
[REVIEW] [at]*matt.peters [at]francis.hurteau
#rb Matt.Peters

[CL 34541588 by matt breindel in ue5-main branch]
2024-06-20 15:25:32 -04:00
steve robb
206d9d76b4 Replaced EAutomationTestFlags::ApplicationContextMask with EAutomationTestFlags_ApplicationContextMask.
[CL 34335388 by steve robb in ue5-main branch]
2024-06-13 07:06:47 -04:00
matt peters
55c4daaff8 IncrementalCook: Add TObjPtr references made from Linker::PreLoad and UObject::PostLoad to the dependencies for the package of the object being pre or post loaded.
#rnx
#rb Zousar.Shaker

[CL 34161632 by matt peters in ue5-main branch]
2024-06-06 12:30:55 -04:00
matt peters
cf57cba0cd IncrementalCook: Add ObjectRedirectors recorded by the RedirectCollector to the RedirectionSummary per package that is maintained by CoreRedirects. SoftObjectPaths are swapped (without ever being resolved) during SavePackage to point to the redirected locations, so if package A has a softobjectpath to B and B is redirected to C, the softobjectpath text in A's cooked output needs to modified to C, and we therefore need to recook A.
#rnx
#rb Zousar.Shaker

[CL 34152869 by matt peters in ue5-main branch]
2024-06-06 07:05:15 -04:00
julien stjean
927fd48290 Add a way to safely use UE::AssetRegistry::FFiltering::ShouldSkipAsset(const FTopLevelAssetPath& AssetClass, uint32 PackageFlags)
in parrallelfor that block the GameThread.

#jira UE-214831

#rb Matt.Peters

[CL 33932115 by julien stjean in ue5-main branch]
2024-05-27 18:13:02 -04:00
robert millar
df1e10047d Add new AUTORTFM macros which can be followed by braced blocks to make them work better with the debugger
e.g. UE_AUTORTFM_OPEN2{ ... code ... };

#rb neil.henning

[CL 33869184 by robert millar in ue5-main branch]
2024-05-23 14:22:32 -04:00
danny couture
48ba56bda5 [ALT]
- Fix TSAN warnings when FGCObject is destroyed from a worker thread while holding a gc scope guard

#jira UE-175467
#rb kevin.macaulayvacher

[CL 33454750 by danny couture in ue5-main branch]
2024-05-06 09:21:28 -04:00
robert millar
4033356439 Move TDirectoryTree from CoreUObject to Core.
#rb matt.peters

[CL 32815710 by robert millar in ue5-main branch]
2024-04-08 21:37:55 -04:00
matt peters
1a875d0e48 AssetRegistry: Centralize all of the hard-coded classpath strings used by the AssetRegistry. Use hard-coded strings wherever we were previously using StaticClass()->GetClassPathName() in case our functions are called from early asyncthread scanning code before the modules are initialized.
#rnx
#rb robert.millar

[CL 32809273 by matt peters in ue5-main branch]
2024-04-08 18:13:56 -04:00
matt breindel
2a0454735e Making the asset gatherer tick run on a background thread. In order to do this, it was also necessary to refactor PostLoadAssetRegistryTags, deprecating the existing function and implementing a new ThreadedPostLoadAssetRegistryTagsOverride. The multithreading functionality is disabled in this checkin. -dpcvars=AssetRegistry.TickGatherOnGTOnly=0 will enable it.
#jira UE-204058
[REVIEW] [at]*matt.peters [at]dan.oconnor [at]ben.zeigler [at]robert.millar
[FYI] [at]francis.hurteau
#rb Matt.Peters

[CL 32388964 by matt breindel in ue5-main branch]
2024-03-20 20:13:47 -04:00
russell johnston
50b7a08a4a AddReferencedObject for VValue
#rb Tim.Smith

[CL 32065658 by russell johnston in ue5-main branch]
2024-03-06 15:45:16 -05:00
matt breindel
3c6cf59c14 Infrastructure and general implementation of a new system for providing improve error messages when we skip loading a package during import because the plugin wasn't mounted. the plugin manager and the GameFeatureSubsystem now have an opportunity to provide additional information to the user about why the plugin wasn't loaded or the package wasn't found.
#jira UE-205029
[REVIEW] [at]will.brown [at]*eric.knapik [at]*danny.couture
[FYI] [at]francis.hurteau
#rb danny.couture, Eric.Knapik

[CL 31957199 by matt breindel in ue5-main branch]
2024-03-01 16:48:08 -05:00
jamie dale
0a22c6c743 Added FPackageName::GetVersePath as a shared util for UObjectBaseUtility and FAssetData
#rb Dave.Belanger

[CL 31737732 by jamie dale in ue5-main branch]
2024-02-22 17:33:37 -05:00
dan thompson
033ec352b1 Since package names are usually FNames, added a helper to avoid any extraneous allocations when grabbing the root.
#jira UE-195217
#rb Matt.Peters

[CL 31690907 by dan thompson in ue5-main branch]
2024-02-21 13:50:00 -05:00
steve robb
f8d47335a4 Replaced RemoveAt(N, 1, EAllowShrinking::*) with RemoveAt(N, EAllowShrinking::*).
[CL 31626444 by steve robb in ue5-main branch]
2024-02-19 16:51:58 -05:00
kevin macaulayvacher
8a51319dfe DoesPackageExist AssetRegistry optimization: Re-enables optimization to avoid scanning on disk for corrected casing for FNames by changing the check to determine when the IoDispatcher is in use.
We expose the previously private, and unused HasScriptObjectsChunk method to the IODispatcher, as multiple codepaths are relying on this path to determine if the IoDispatcher is being used at runtime to load from chunks.

#jira UE-206417
#rb Per.Larsson
[FYI] Francis.Hurteau

[CL 31615213 by kevin macaulayvacher in ue5-main branch]
2024-02-19 12:40:05 -05:00
matt peters
398a33a33c PakFiles: Suppress spurious log message "Mount point '%s' is not mounted to a valid Root Path yet" when the mount point is a parent path of existing root paths.
#rnx
#rb Sebastian.Thomeczek

[CL 31396542 by matt peters in ue5-main branch]
2024-02-12 15:50:54 -05:00
kevin macaulayvacher
249e3334bf Disable DoesPackageExist AssetRegistry optimization as it's breaking Content Worker jobs. To be followed up by UE-206417
#rb Francis.Hurteau

[CL 31349650 by kevin macaulayvacher in ue5-main branch]
2024-02-09 14:03:48 -05:00
kevin macaulayvacher
64646592f7 Adds an InternalDoesPackageExistEx implementation that the AssetRegistry may use to check the filesystem for pacakge existence without potentially re-entering held AssetRegistry locks
#rb Matt.Peters
#jira UE-204062


#changelist validated
#virtualized

[CL 31217954 by kevin macaulayvacher in ue5-main branch]
2024-02-06 11:57:41 -05:00
ben hoffman
0a6de35a5b Editor | Add functionality for automatic fixes in tokenized messages
This allows you to attach an automatic fix to any error or warning that may arise from eg. validation.

#jira none
#rb Julien.StJean

#ushell-cherrypick of 31124509 by gabriel.wreczycki

[CL 31126352 by ben hoffman in ue5-main branch]
2024-02-02 10:58:45 -05:00
matt peters
2d916d7b01 AssetRegistry: Fix deadlock to to unexpected recursion in new code that calls AssetRegistry functions to accelerate FPackageName::DoesPackageExist.
#jira UE-205707
#rnx
#rb Zousar.Shaker

[CL 31116940 by matt peters in ue5-main branch]
2024-02-01 22:20:15 -05:00
kevin macaulayvacher
c5df7074f2 Fixes check for DoesPackageExist to confirm the IoDispatcher is not being used. The IoDispatcher is unilaterally initialized but may never have any mounts mounted so relying on it's initialization value is not correct. Instead of exposing an IoDispatcher::HasMountedBackends(), we rely on GetTotalLoaded==0 to know that we are not actually using the IoDispatcher and can rely on the AssetRegistry to reliably tell if packages exist on the Filesystem.
#jira UE-204062
#rb Matt.Peters, PJ.Kack

[CL 31099175 by kevin macaulayvacher in ue5-main branch]
2024-02-01 15:30:19 -05:00
kevin macaulayvacher
a66f947914 Improves DoesPackageExistEx by enabling it to use the AssetRegistry when it's available
Before Boot -> PIE
FPackageName::DoesPackageExistEx called 191284 times takes 16.45s in total

After Boot -> PIE
FPackageName::DoesPackageExistEx called 191743 times takes 1.61s in total

The majority of the 1.6s (1s) is from calling DoesPackageExistEx before the AssetRegistry has initialized and can provide a fast path. The 180K calls afterwards consume a total of 600ms compared to before, which took 15s.

The original DoesPackageExistEx code checked for package existence on the filesystem, and at the same time found the case matching package name (the casing the file system uses for the package name). This information is known to the AssetRegistry so we can avoid the duplicate work by deferring to the AssetRegistry.

The AssetRegistry needs to initialize itself, and previously did not expose a means to get the Case Matching FNames for Packages which are being used as the keys to AssetPackageData. We add a new overload to IAssetRegistryInterface::TryGetAssetPackageData to allow CoreUObject code to access the another new overload in the AssetRegistry::GetAssetPackageData which returns the case matching FName for the package as an out parameter. Since IAssetRegistryInterface can be used while the AssetRegistry doesn't exist or is still intializing, IAssetRegistryInterface::TryGetAssetPackageData will return UE::AssetRegistry::EExists::Unknown when the asset registry is not yet available. In the Unknown case, we fallback to the original FPackageName::DoesPackageExistEx codepath which reads from disk.

I've made the (Try)GetAssetPackageData methods that only return FAssetPackageData* to use the new implementation that returns a FAssetPackageData* and populates an FName in order to reduce code duplication, however I'm open to changing this if the extra store is a concern. All paths perform the key search in the AssetRegistry's CachedAssetPackageData map.

#jira UE-204062
#rb Matt.Peters

[CL 31055136 by kevin macaulayvacher in ue5-main branch]
2024-01-31 13:06:38 -05:00
steve robb
f029468598 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30729174 by steve robb in ue5-main branch]
2024-01-19 16:41:35 -05:00
steve robb
66266c6a11 Fixed up DerivedDataCache, DesktopPlatform, ApplicationCore, AssetRegistry, Core, CoreUObject, Projects, Sockets code to use EAllowShrinking instead of bools.
[CL 30676428 by steve robb in ue5-main branch]
2024-01-17 19:51:06 -05:00