Commit Graph

43 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
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
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
per larsson
7b3c2ac4ed I/O - added support for loading ondemand utoc files from CbObject
#rb trivial
#preflight 643ceb978901e5ef98c7b9e3

[CL 25066201 by per larsson in ue5-main branch]
2023-04-17 07:29:44 -04:00
per larsson
7b3a9ed322 I/O - extended ondemand I/O store writer to output compressed and encrypted chunks
- renabled the ondemand PAK rule that was previously removed
- enabled handling more than one ondemand containe
- added ondemand I/O store TOC
- added support for serializing ondemand TOC's to CbObjet

#rb Martin.Ridgers
#preflight 6436cbf80c19befb6c8ee4cc

[CL 25025449 by per larsson in ue5-main branch]
2023-04-13 10:51:22 -04:00
henrik karlsson
c8c3d0b8b2 [Core]
* Made code compatible with modules/header units. This includes following things:
   * Removed static in front of global functions/variables (static indicates it is hidden outside of module/header unit which is not what many places want...)
   * Moved dllexport from type to methods in order to get dllexport of static constexpr fields. This is supposed to work according to microsoft but since it is a good change I don't mind doing it anyway)
   * static constexpr -> static constexpr inline for member variables and methods (this makes them available outside module/headerunit)
   * Added HEADER_UNIT_IGNORE markup to includes that are circular
   * Added HEADER_UNIT_SKIP to files that can't compile by themselves

#preflight 63e2aeba3c44c83044bfcc75
#rb steve.robb

[CL 24066986 by henrik karlsson in ue5-main branch]
2023-02-08 00:25:15 -05:00
martins mozeiko
993681afd5 Fixes non-unity build, previous change requires FStringView type visible in header
[CL 23924046 by martins mozeiko in ue5-main branch]
2023-01-31 01:28:16 -05:00