Commit Graph

48 Commits

Author SHA1 Message Date
pj kack
4161e66f68 Move all IoStoreWriter code (writing of .utoc/.ucas containers) out from Core into IoStoreUtilities.
Break cyclic dependency on DerivedDataCache module to utilize DDC2 API to cache compressed chunks.
The declarations moved from the public header are considered private and are not really usable outside of the IoStoreUtilities/UnrealPak context.

#rb per.larsson
#rnx
#tests BuildCookRun Lyra with pak/container files

[CL 31986007 by pj kack in ue5-main branch]
2024-03-04 07:47:44 -05:00
paul chipchase
f0805a8dda Remove the additional metadata added in CL 28039514 from the IoStoreToc.
#rb Per.Larsson
#jira UE-189912
#rnx

- The metadata was originally added so that we could generate a toc for OnDemand streaming data if needed at runtime, but we no longer have any plans to support this functionality so we can remove it.
- The change still allows .utoc files that contain the additional metadata to be read. Since the data was at the end of the structure we can just ignore it and the code does not need to consider it's existence.
- Strictly speaking there was no need to add a new entry to EIoStoreTocVersion but we have chosen to do so on the off chance that we need to identify .utoc files that were created while this code was active, for what ever reason.

[CL 31938508 by paul chipchase in ue5-main branch]
2024-03-01 03:41:44 -05:00
pj kack
d1e6599753 IoStore: Move FIoStoreToc::GetTocChunkInfo to FIoStoreTocResource::GetTocChunkInfo and split the concerns of FIoStoreToc into FIoStoreTocBuilder and FIoStoreTocReader.
Prepare for moving IoStoreWriter out of Core to IoStoreUtilities.

#rb per.larsson
#rnx
#tests Packaging and running cooked LyraGame

[CL 31801867 by pj kack in ue5-main branch]
2024-02-26 09:00:04 -05:00
danny couture
ea70bfb92d [IoPriorityQueue]
- Fix constness on read-only member function

#rnx
#rb kevin.macaulayvacher

[CL 31762875 by danny couture in ue5-main branch]
2024-02-23 09:51:17 -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
per larsson
dccb6df43e I/O - changed dispatcher backend interface from resolving a single to a batch of I/O requests.
#rb Paul.Chipchase, Martin.Ridgers
#rnx

[CL 31469283 by per larsson in ue5-main branch]
2024-02-14 08:43:21 -05:00
henrik karlsson
9983643fb9 Compile error fixes for iwyu when compiling UnrealEditor
#rb christopher.waters (and phil.pizlo for verse files)


#changelist validated
#virtualized

[CL 31228054 by henrik karlsson in ue5-main branch]
2024-02-06 15:28:47 -05:00
paul chipchase
121e9d5e0a Add new delegates to better allow various IoDispatcher subsystems to mount their containers when .pak files are mounted.
#rb Per.Larsson
#jira UE-189912
#rnx

- The filebased iostore system is tightly linked to the existing pakfile code and recieved notifications when a PakFile is mounted/unmounted directly in code. However we do not want to force the IAS system on all users, it should be opt in. So we need a generic way to hook into the PakFile system and be notified about PakFile operations.
- Add a new delegate (FCoreInternalDelegates::GetOnPakMountOperation) that is fired when ever a pakfile is mounted or unmounted.
- Add a new delegate (FCoreInternalDelegates::GetCurrentlyMountedPaksDelegate) that can be queried to find all of the pakfiles that are currently mounted.
- Both delegates are in a new internal header file to limit their use to the engine which will make it easier to change in the future if we need to do so.

[CL 30680178 by paul chipchase in ue5-main branch]
2024-01-18 05:21:17 -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
steve robb
7da84c1d1b Replaced UE_NODISCARD with [[nodiscard]].
[CL 30593744 by steve robb in ue5-main branch]
2024-01-12 10:47:04 -05:00
per larsson
913ac48b7c Const correct and more thread safty encryption key manager
#rb Paul.Chipchase

[CL 30111281 by per larsson in ue5-main branch]
2023-12-05 06:30:14 -05:00
per larsson
d3bd8156ad IAS - move encryption key manager to core/misc
#rb Martin.Ridgers

[CL 30076764 by per larsson in ue5-main branch]
2023-12-04 07:24:44 -05:00
paul chipchase
f5c7921948 Add support for generating OnDemandToc data from UToc files on disk rather than downloading the data each time the process is launched. This feature is off by default.
#rb PJ.Kack, Per.Larsson
#rnx

### Configuration

- New cvar 's.IasGenerateOnDemandUtoc' which when set to true will tell the IasBackend to generate the OnDemand toc file from all of the utoc files marked as supporting OnDemand currently on disk. Defaults to false.
-- When we ship the IAS feature this will be changed to true.
- Note that both cvars are used before '-dpcvars' is applied so cannot be overriden from the cmdline.
- When UE_VALIDATE_GENERATED_TOC is enabled we will download the ondemand toc from the CDN anyway and check that the generated version from disk has the same values (where important) and trigger an assert if there are differences. This is intended to help debugging future compatibility issues.

## IoDispatcher Changes

- Add new method FIoStoreReader::GetChunkCompressedInfo allowing the caller to get info about a compressed chunk without actually loading it from disk.
- Changed FIoStoreReader::Initialize to take a string view rather than raw string pointer.
- FIoStoreTocResource now has an array of meta data for chunks and another for blocks, specifically for IAS (FIoStoreTocResource::OnDemandChunkMeta/OnDemandCompressedBlockMeta)
-- This data will only be generated for utoc files with OnDemand support to avoid bloating the non-ondemand utocs.
-- This data is considered meta data and will be read when EIoStoreTocReadOptions::ReadTocMeta is enabled.
- Reordered some includes to match the IWYU tool.
- Minor optimization to FIoStoreToc::Initialize

### IAS Changes

- The IoStoreOnDemand module now includes the 'Pak'File' module so that we have access to the pak directories.
- Add FEncryptionKeyManager::GetAllKeys which would be needed if IAS data ends up being encrypted.
-- The encryption path has not yet been tested and probably will need some form of defered mounting (for cases where the encryption keys are applied at a later point)

[CL 28039592 by paul chipchase in ue5-main branch]
2023-09-20 12:06:29 -04:00
martin ridgers
70f3d54b1b Moved file cache into ioscod and eliminated base class .h/.cpp
#rb perl
#rnx
#jira
#preflight 646dd2d51b241f07480ef1b3

[CL 25599566 by martin ridgers in ue5-main branch]
2023-05-24 06:13:15 -04:00
martin ridgers
f4ed631edf Removed in-memory cache experiment
#rb perl
#rnx
#jira
#preflight 646db3981134ffac7072c9e2

[CL 25598669 by martin ridgers in ue5-main branch]
2023-05-24 04:06:02 -04:00
per larsson
92c4fb4c0b I/O - removed on demand TOC from core since this has moved to new module
#rb none
#preflight 6469c9ca573c1da158828c03
#rnx

[CL 25559309 by per larsson in ue5-main branch]
2023-05-21 10:15:18 -04:00
martin ridgers
d7f0c78156 Non-unity fix
#rb trivial
#rnx
#jira
#preflight

[CL 25445409 by martin ridgers in ue5-main branch]
2023-05-12 07:10:30 -04:00
per larsson
f72cc84a5a I/O - move slab allocator to internal for reuse between backends
#rb PJ.Kack
#preflight 645dc3106b4bdec267c9cfd2

[CL 25444366 by per larsson in ue5-main branch]
2023-05-12 03:50:13 -04:00
per larsson
00573797c3 I/O - simple file based FIFO cache
#rb none
#preflight 644b6f70401d328ad90fa1c5

[CL 25238719 by per larsson in ue5-main branch]
2023-04-28 15:55:46 -04:00
per larsson
5d85c42089 I/O - parallel HTTP requests
- removed background thread in favor using Tasks
- using fixed set of task pipes to throttle HTTP requests
- updated chunk encoding API to use FIoStatus and FOffsetAndLength

#rb none
#preflight 644a50851150e908d00b36f3

[CL 25214018 by per larsson in ue5-main branch]
2023-04-27 10:06:24 -04:00
per larsson
d57a460945 Added missing export
#rb trivial
#preflight none

[CL 25174981 by per larsson in ue5-main branch]
2023-04-24 22:59:26 -04:00
per larsson
ab30bdc35b I/O - added caching to HTTP I/O backend
-  added simple in memory LRU cache for testing purposes, enabled with -HttpBackendMemoryCache=<size>

#rb none
#preflight 6446408e0171aae0b1e8855e

[CL 25162523 by per larsson in ue5-main branch]
2023-04-24 08:27:25 -04:00
per larsson
0804ba324f I/O - move FIoOffsetAndLength to separate header
#rb Paul.Chipchase
#preflight 64412146a35280ed4f2500ab

[CL 25142898 by per larsson in ue5-main branch]
2023-04-21 04:08:48 -04:00
danny couture
1b51796326 Properly handle query to GPlayInEditorID while packages are being loaded
#rnx
#jira UE-175454
#rb Francis.Hurteau, Ben.Zeigler
#preflight 64399e149566b61450059959

[CL 25066973 by danny couture in ue5-main branch]
2023-04-17 09:17:06 -04:00