Commit Graph

276 Commits

Author SHA1 Message Date
andriy tylychko
d938d346bd fixed crash in AsyncFileHandle with unimplemented EnsureCompletion()
#jira UE-195894
#rb danny.couture, francis.hurteau

[CL 28313586 by andriy tylychko in ue5-main branch]
2023-09-28 07:09:26 -04:00
nick edwards
220ccc4b3e FIoDirectoryIndexReader::IterateDirectoryIndex: Use FStringViews and TStringBuilders instead of FStrings to avoid potentially unnecessary heap allocations
FPakPlatformFile::ForeachPackageInIostoreWhile: Update usage of IterateDirectoryIndex, and use overload of TryConvertFilenameToLongPackageName using string views and builders to avoid allocations

#rb elias.lozadabenavent
#rb anton.dunchev

[CL 28282945 by nick edwards in ue5-main branch]
2023-09-27 14:10:02 -04:00
justin marcus
895bb59e4d GFP state machine can now detect when its possible to force monolithic shader library loading which is faster if we know we don't need to search for chunked shader libraries.
- Can be disabled with CVarAllowForceMonolithicShaderLibrary.
- FGameFeaturePreMountingContext can disable shader library loading in cases where we may want to control it externally.
- Install bundle manager now tracks if a bundle contains chunks
- GetPakchunkIndexFromPakFile now uses string views and string builders instead of temporary strings
- GetPakchunkIndexFromPakFile is no longer duplicated in IPlatformFilePak
- FPakPlatformFile::HandleMountPakDelegate no longer does a linear search to find the just mounted pak file


[REVIEW] [at]Dave.Belanger [at]Thomas.Ross [at]Bob.Tellez

[CL 28049947 by justin marcus in ue5-main branch]
2023-09-20 15:11:58 -04:00
matt peters
2d8cad97a6 PakFiles and FileManager: Add IPlatformFile::FDirectoryVisitor::ShouldVisitLeafPath for directory visitors that are ignoring some files, so that FPakFile::ValidateDirectorySearch knows that invalid-to-request files were not requested despite being present in the searched directories.
#rnx
#rb Zousar.Shaker

[CL 28012483 by matt peters in ue5-main branch]
2023-09-19 16:51:05 -04:00
matt peters
cca6524868 PlatformFilePak: Move IPlatformFile directory API functions into cpp file for readability and compile time improvements. Remove functions deprectated on or before 4.27.
#rb None, trivial
#rnx

[CL 27971653 by matt peters in ue5-main branch]
2023-09-18 15:54:58 -04:00
matt peters
0538198ab4 PakFiles: Downgrade the Warning: MissingPrunedPakFile from error to warning until we implement a fix for the spurious instances of the error.
#rnx
#rb None, trivial

[CL 27935012 by matt peters in ue5-main branch]
2023-09-15 17:31:46 -04:00
david harvey
35c367d801 Centralize ENABLE_PLATFORM_CHUNK_INSTALL declarations into GenericPlatformChunkInstall.h
#rnx
#rb trivial

[CL 27480709 by david harvey in ue5-main branch]
2023-08-30 06:36:54 -04:00
matt peters
678e02de1a PakFiles: Add logging of the callstack for errors about directory searches that return incomplete results because of pakfilepruning.
#rnx
#rb Dan.Thompson

[CL 27067146 by matt peters in ue5-main branch]
2023-08-14 08:42:51 -04:00
robert millar
c5a7662189 Speculative fixes for hang detected in ReleaseOldReaders
Acquire list of pak files and then release pak-list lock.
Only release if we can acquire the reader lock without waiting.

#rb none

[CL 26864080 by robert millar in ue5-main branch]
2023-08-04 18:41:29 -04:00
david harvey
847fd70841 Add a new experimental bundle source that uses the platform chunk installer, via some optional new functions in the chunk installer interface.
#jira UE-146398
#rnx
#rb Justin.Marcus

[CL 26733411 by david harvey in ue5-main branch]
2023-08-01 04:46:51 -04:00
spoiltos
420553ff43 PR #10540: Fixed assert message in IPlatformFilePak.cpp
#rb zahra.nikbakht

[CL 26183285 by spoiltos in ue5-main branch]
2023-06-22 11:10:00 -04:00
eric knapik
bc3b5dd786 #jira: none
Adding some Pak initialization and deinitialization logging to track down a horde only ensure.

#rb: trivial

[CL 25795014 by eric knapik in ue5-main branch]
2023-06-05 12:36:27 -04:00
Wojciech Krywult
d1baf24722 AsyncIO: Fixed incorrect handling of the STAT_AsyncFileMemory stat.
I've reviewed all code using async requests and we had multiple places incorrectly handling the stat: some placed failed to decrease the counter, while others would decrease it when they shouldn't. The main cause was the fact that when we create an async request and pass nullptr as the target memory, the request allocates the memory itself and increases the STAT_AsyncFileMemory. However, when we call GetReadResults() on such requests, the responsibility is on the caller to balance the calls and decrease the stat, which is not very obvious and leads to the mentioned bugs. On top of that, when we call GetReadResults() we may not have the knowledge as to whether the returned memory was allocated by the request or not (which may affect whether we should touch the stat at all).

Resolved by adding IAsyncReadRequest::ReleaseMemoryOwnershipImpl member, which may be used by request implementations to do the proper clean up (balance the stat). This way requests take the full responsibility for their changes and users of the requests don't need to know their implementation details.

#preflight none
#rb Patrick.Laflamme
#jira UE-185064

[CL 25664733 by Wojciech Krywult in ue5-main branch]
2023-05-29 12:11:37 -04:00
dan thompson
5ecef89101 Validating index loading for upacks.
#jira UE-173038
#rb charles.bloom
#preflight 646d0bc96c2a2532b1747645

[CL 25593251 by dan thompson in ue5-main branch]
2023-05-23 18:33:52 -04:00
matt peters
b6bd711eaa PakFiles: If FChunkCacheWorker's construction fails and the FChunkCacheWorker is invalid, fail the entire Pak by returning nullptr from CreatePakReader rather than allowing creation of an FSignedArchiveReader that will crash in FChunkCacheWorker::CheckSignature.
#rb Robert.Millar
#rnx
#preflight 6446b821dc71c13446eed5d1

[CL 25175481 by matt peters in ue5-main branch]
2023-04-24 23:21:31 -04:00
Andriy Tylychko
33551a6eaf deprecated FCoreDelegates::OnFileOpenedForReadFromPakFile because it's thread-safe but is used concurrently. Added a thread-safe version FCoreDelegates::GetOnFileOpenedForReadFromPakFile() and switched all use cases to the new one
#rb francis.hurteau
#preflight 641d9f8d7a393e211af9829b
#preflight 641d9f8d7a393e211af9829b

[CL 24778456 by Andriy Tylychko in ue5-main branch]
2023-03-24 09:22:49 -04:00
Andriy Tylychko
7b5ca318e0 deprecated FCoreDelegates::OnPakFileMounted2 because it's thread-safe but is used concurrently. Added a thread-safe version FCoreDelegates::GetOnPakFileMounted2() and switched all use cases to the new one
#rb francis.hurteau
#preflight 641d99d214423a492d30c75a

[CL 24778298 by Andriy Tylychko in ue5-main branch]
2023-03-24 08:57:53 -04:00
james doverspike
90c0ddf9ba [Backout] - CL24328738
[FYI] james.doverspike
Original CL Desc
-----------------------------------------------------------------
Cosmetic bulk asset streaming

Adds support for marking skeletal meshes and textures as optional files that stream from the cloud, typically used for cosmetics. Meshes and textures will now upload all of their non-inlined LODs as optional bulk files to the cloud, removing them from the pak files. The client will download into the VirtualFileCache in PersistentDownloadDir/VFC, which evicts least recently used LODs. These assets will have a longer delay to update to the higher quality LOD when their LODs are not in cache because they are now downloaded on-demand.

[CL 24373261 by james doverspike in ue5-main branch]
2023-02-22 19:19:46 -05:00
james doverspike
6a8a19a4b7 Cosmetic bulk asset streaming
Adds support for marking skeletal meshes and textures as optional files that stream from the cloud, typically used for cosmetics. Meshes and textures will now upload all of their non-inlined LODs as optional bulk files to the cloud, removing them from the pak files. The client will download into the VirtualFileCache in PersistentDownloadDir/VFC, which evicts least recently used LODs. These assets will have a longer delay to update to the higher quality LOD when their LODs are not in cache because they are now downloaded on-demand.

[CL 24331735 by james doverspike in ue5-main branch]
2023-02-20 20:22:07 -05:00
bob tellez
79d7201510 [Backout] - CL24230614
[FYI] james.doverspike
Original CL Desc
-----------------------------------------------------------------
Cosmetic bulk asset streaming

Adds support for marking skeletal meshes and textures as optional files that stream from the cloud, typically used for cosmetics. Meshes and textures will now upload all of their non-inlined LODs as optional bulk files to the cloud, removing them from the pak files. The client will download into the VirtualFileCache in PersistentDownloadDir/VFC, which evicts least recently used LODs. These assets will have a longer delay to update to the higher quality LOD when their LODs are not in cache because they are now downloaded on-demand.

[CL 24253381 by bob tellez in ue5-main branch]
2023-02-16 04:15:55 -05:00
james doverspike
4e78faf0de Cosmetic bulk asset streaming
Adds support for marking skeletal meshes and textures as optional files that stream from the cloud, typically used for cosmetics. Meshes and textures will now upload all of their non-inlined LODs as optional bulk files to the cloud, removing them from the pak files. The client will download into the VirtualFileCache in PersistentDownloadDir/VFC, which evicts least recently used LODs. These assets will have a longer delay to update to the higher quality LOD when their LODs are not in cache because they are now downloaded on-demand.

[CL 24251508 by james doverspike in ue5-main branch]
2023-02-16 01:47:06 -05:00
anton dunchev
990e8f0d44 MemQuery use PackageStore to resolve dependencies
#tests replay
#rb Robert.Millar
[FYI] andrew.ladenberger, simon.orr

[CL 24202843 by anton dunchev in ue5-main branch]
2023-02-13 22:45:46 -05:00
Matt Peters
7dfa3846ff PakFilePrecacher: Fix deadlock by avoiding calling the body of ClearOldBlockTasks while holding CachedFilesScopeLock.
ClearOldBlockTasks can BusyWait, which can call FAsyncIOCPUWorkTask::DoTask, which can try to take a FPakAsyncReadFileHandle's CriticalSection. FPakAsyncReadFileHandle's CriticalSection must be entered first when holding both CriticalSection and CachedFilesScopeLock to prevent deadlocks.
#rb Per.Larsson
#rnx
#preflight 63e144cdc2257e56f4ee08a3

[CL 24035541 by Matt Peters in ue5-main branch]
2023-02-06 14:17:52 -05:00
jeanmichel dignard
8d07a7338f Exec commands changes:
- Port some development only exec commands to Exec_Dev.

#rb none
#preflight 63c5c97f02024f93d822d678

[CL 23734254 by jeanmichel dignard in ue5-main branch]
2023-01-16 19:28:53 -05:00
Francis Hurteau
9dfe27ab41 Truncation warning fixes for multiple core modules:
CookOnTheFly, CookOnTheFlyNetServer, PakFileUtilities, PakFile

#jira UE-166274
#rb PJ.Kack
#preflight 63c041f01a06fc61057115b7

[CL 23666183 by Francis Hurteau in ue5-main branch]
2023-01-12 13:17:30 -05:00