Commit Graph

153 Commits

Author SHA1 Message Date
CarlMagnus Nordin
3d5a2052dc AsyncLoading2: Add support for having multiple PackageStore backends
#preflight 6296fc872a1851b4ccae7e39
#rb pj.kack

[CL 20447121 by CarlMagnus Nordin in ue5-main branch]
2022-06-01 02:12:33 -04:00
Andriy Tylychko
1ac9a76c0c releasing FIoBatchImpl::Callback right after it's called to avoid a long living allocation that keeps a larger memory block from being returned to the system
#rb CarlMagnus.Nordin
#preflight trivial

[CL 20429437 by Andriy Tylychko in ue5-main branch]
2022-05-30 05:43:13 -04:00
Dan Thompson
3a6321167b Packaging Reference Chunk Database - "Lossless Patch Preventer"
Can now provide reference iostore containers to reuse compressed chunks from. If a match is found on *the decompressed data*, instead of recompressing the blocks, they are read off of disk. This allows tweaks of the compressor algorithm without introducing changes as the runtime still sees the exact same data. Additionally this allows for fairly dramatic staging speedups as nvme speeds are significantly faster than high effort compressions. This is distinct from the DDC compression because:
1) DDC compression ties in the compressor version/method
2) We are explicitly interested in chunks that are deployed to end users, not merely cached for speed.

To facilitate this, several changes were made to IoStore:

FIoStoreReader now directly reads from IFileHandles* instead of routing through the GenericPlatformFile async read system, as that system is sensitive to build #defines and can result in constant file opens under load (indeed, for anything not a .pak file, every read is an open/close).

Cold file cache read speed improvements from ~140MB/s to ~1 GB/s. Hot is more.

Additionally:
    FIoStoreReader switched to UE::Tasks from taskgraph for tasks in order to facilitate task retraction during waits as the previous ReadAsync call was trivial to deadlock when called from worker threads due to its use of TFuture<>.
    FIoStoreReader::ReadCompressed now returns the compressed blocks as they were on disk - padded to AES encryption block size.

#rb fabian.giesen
#rb jeff.roberts
#preflight 627586dcf77c9c2b543d4d8b

[CL 20086673 by Dan Thompson in ue5-main branch]
2022-05-06 18:22:44 -04:00
Dan Thompson
718ea8fe80 Several IoStore determinism fixes:
-- Shaders must be sorted prior to inlining, as they are inserted in to a sorted list.
-- Break ties sorting shaders on disk with chunkid (hash)
-- Sort the shader map hashes in the package store entry
-- Pick the lowest LoadOrderFactor instead of the first for shaders that are used in more than one package.
-- Fix -WriteFinalOrder to actually write the final order as well as all chunks.
#rb fabian.giesen, charles.bloom
#preflight 627441a7de15651eeb416fbf

[CL 20065025 by Dan Thompson in ue5-main branch]
2022-05-05 17:43:49 -04:00
CarlMagnus Nordin
63b8cbc9dd AsyncLoading2: Implemented loading of optional package segments
#rnx
#preflight 62627548ac29fcf6a213fe33
#rb francis.hurteau

[CL 19900368 by CarlMagnus Nordin in ue5-main branch]
2022-04-25 07:37:07 -04:00
Yuriy ODonnell
91991833fc Workaround for MSVC 19.31.31107 internal compiler error in some build configurations, related to calling member functions of OffsetLength multiple times
#rb carlmagnus.nordin
#preflight 6262b42bd558dfdec38bfcd9

[CL 19865039 by Yuriy ODonnell in ue5-main branch]
2022-04-22 10:34:57 -04:00
Andriy Tylychko
3b82927aee removed unused NewTasks from TaskGraph's FGraphEvent::DispatchSubsequents() calls, as a preparation for deprecation
#preflight https://horde.devtools.epicgames.com/job/6244160fdc6183e3f5ef6650
#rb francis.hurteau, danny.couture

[CL 19554617 by Andriy Tylychko in ue5-main branch]
2022-03-30 04:53:52 -04:00
Per Larsson
593ae48c68 IoBuffer - additional constructors from memory view
#rb Paul.Chipchase
#rnx
#jira none
#preflight none

[CL 19465971 by Per Larsson in ue5-main branch]
2022-03-22 09:48:39 -04:00
steve robb
87fb605867 TCHAR array init fixes for UTF-8 mode.
#rb devin.doucette
#preflight 6231e536e2541b4ff3af6cd2

#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 19405353 via CL 19408955 via CL 19419621 via CL 19419706
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)

[CL 19420584 by steve robb in ue5-main branch]
2022-03-17 10:29:53 -04:00
Dan Thompson
c88187f01d Overlap IoStore reads with decrypt/decompress.
#rb carl-magnus.nordin
#rb fabian.giesen
#rb charles.bloom
#preflight 622baa6032749f363c91bec7

[CL 19376611 by Dan Thompson in ue5-main branch]
2022-03-14 15:13:04 -04:00
steve robb
288f3de432 Fixes for the implicit conversion of ints and chars to TCHARs in UTF-8 mode.
#rb trivial
#preflight 621ed0b4e15c51d8c5e5d081

#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 19219816 via CL 19220283 via CL 19220288 via CL 19223679
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19227684 by steve robb in ue5-main branch]
2022-03-02 15:30:50 -05:00
robert millar
c92ae0a568 Fix calculation of number of partitions for iostore containers to use end of last block rather than start of last block.
[REVIEW] [at]mickael.gilabert
[FYI] carlmagnus.nordin

#localization none
#tests staged & run windows server locally

#ROBOMERGE-AUTHOR: robert.millar
#ROBOMERGE-SOURCE: CL 19215022 via CL 19215034 via CL 19215053 via CL 19216736 via CL 19216776 via CL 19216795
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19225352 by robert millar in ue5-main branch]
2022-03-02 14:02:57 -05:00
Dan Thompson
3af41336cd Adding support for querying the iostore TOC off of a writer instead of just a reader. This is to allow the staging process to find package information and write it back to an asset registry.
#preflight 621d3e7b9a5676d19a3fdd5d
#rb carl-magnus.nordin

[CL 19202453 by Dan Thompson in ue5-main branch]
2022-03-01 13:33:10 -05:00
jonathan bard
9372101ef9 * Added a scope object (IModularFeatures::FScopedLockModularFeatureList) to more easily lock/unlock the list of modular features when accessing it.
* Fixed render capture provider firing an assert when accessing IModularFeatures from outside the game thread (naive implementation for now, since this is a accessed very sporadically)
* Avoid locking the modular features list when calling GetEngineCrypto(), since the IEngineCrypto* is only accessed once and stored in a static member

#rb peter.knepley, carl-magnus.nordin

#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-SOURCE: CL 19091116 via CL 19097126 via CL 19098363 via CL 19105418
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19146756 by jonathan bard in ue5-main branch]
2022-02-25 09:47:32 -05:00
pj kack
d3a6effc10 Fix crash in iostore describe command when reading uncompressed data.
Fix broken import lookup logic.

#jira UE-142894
#rb carlmagnus.nordin
#rnx
#preflight 620d0c47b71c717652eeea70
#lockdown mark.lintott

#ROBOMERGE-AUTHOR: pj.kack
#ROBOMERGE-SOURCE: CL 19070380 in //UE5/Release-5.0/... via CL 19090244
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19133386 by pj kack in ue5-main branch]
2022-02-24 19:30:07 -05:00
peter knepley
2bb2384883 Fix GetEngineCrypto() not being threadsafe
#ROBOMERGE-AUTHOR: peter.knepley
#ROBOMERGE-SOURCE: CL 19018238 via CL 19018279 via CL 19018305 via CL 19018333 via CL 19018395 via CL 19031929
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v917-18934589)

[CL 19032158 by peter knepley in ue5-main branch]
2022-02-17 03:42:16 -05:00
zak middleton
77f452fb9b #ue5 - LWC: Added *ToInt32() versions to Trunc/Round/Floor/Ceil to make those able to be explicit and cleaner to replace where needed. Added missing TruncToInt64(double), RoundToInt(double), RoundToInt64(double).
Added overloads for *ToFloat(double) methods to TUnrealPlatformMathSSE4Base to avoid ambiguous overloads (and make it easier for us to update later when do another pass at int64 versions).

Resolved ambiguous Max() and Min() calls when mixing int32/int64, float/double, etc by using macro to promote to the largest precision type.

#jira UE-124808
#rb Andrew.Davidson
#lockdown Julien.Marchand
#preflight 6206fa3af7376af79b56ea83

#ROBOMERGE-AUTHOR: zak.middleton
#ROBOMERGE-SOURCE: CL 18984296 in //UE5/Release-5.0/... via CL 18985501 via CL 18987604
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18987966 by zak middleton in ue5-main branch]
2022-02-14 18:29:44 -05:00
pj kack
2ff44cf3c3 Fix deadlock in iostore describe command by implementing FIoStoreReader::Read() without using tasks
#jira UE-142101
#rb carlmagnus.nordin
#rnx
#preflight 6204fdefe54ab7c24bb142cf

#ROBOMERGE-AUTHOR: pj.kack
#ROBOMERGE-SOURCE: CL 18950335 in //UE5/Release-5.0/... via CL 18950371 via CL 18950424
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18950425 by pj kack in ue5-main branch]
2022-02-11 05:49:09 -05:00
carlmagnus nordin
a201cd8e12 Fixed up uses of FIoDispatcher::IsInitialized() so that they work correctly also when there's a mix of cooked packages in iostore and uncooked packages on disk
FIoDispatcher::IsInitialized() will now return true if it exists (which is almost always)
Renamed FArchive::IsUsingEventDrivenLoader() to IsLoadingFromCookedPackage and based it on the PKG_Cooked flag
#rnx
#rb pj.kack
#preflight 61f3ab6f74510448a6740570

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 18769198 in //UE5/Release-5.0/... via CL 18769204 via CL 18769272
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18769277 by carlmagnus nordin in ue5-main branch]
2022-01-28 04:29:58 -05:00
francis hurteau
eb9289d834 Added support to PackageStoreOptimizer to support optional package when generated from legacy cooked header
Support for Zen store will be added separately

#jira UE-129805
#rb CarlMagnus.Nordin, Matt.Peters
#preflight 61e6f8d73778a195debaffa6

#ROBOMERGE-AUTHOR: francis.hurteau
#ROBOMERGE-SOURCE: CL 18642382 in //UE5/Release-5.0/... via CL 18642393 via CL 18642414
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18642448 by francis hurteau in ue5-main branch]
2022-01-18 13:01:31 -05:00
carlmagnus nordin
fdc3ad3cb7 Move IoDispatcherFileBackend from Core to PakFile
#rnx
#preflight 61b89ea22e65a1df0459b68a
#rb pj.kack

#ROBOMERGE-OWNER: carlmagnus.nordin
#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 18465244 via CL 18465257 via CL 18465387 via CL 18465391 via CL 18465458 via CL 18465466
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18465469 by carlmagnus nordin in ue5-release-engine-test branch]
2021-12-15 03:24:48 -05:00
carlmagnus nordin
2d62fe9c29 IoDispatcher:
Fixed requests never being batched in single threaded mode
Always use the generic file backend in single threaded mode
#rnx
#rb pj.kack
#preflight 61a5f40eec124631d75122ab

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 18322918 via CL 18322919 via CL 18323535 via CL 18323562 via CL 18323905 via CL 18323968
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18324001 by carlmagnus nordin in ue5-release-engine-test branch]
2021-11-30 09:01:21 -05:00
carlmagnus nordin
7070b5d25f IoStore:
Log toc signature hash when mounting containers
Add guard against loading toc files with a later version than we know about
#rnx
#rb per.larsson
#preflight 61a5d3ddae3418c7dfc944a1

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 18322682 via CL 18322689 via CL 18323461 via CL 18323527 via CL 18323901 via CL 18323964
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18323991 by carlmagnus nordin in ue5-release-engine-test branch]
2021-11-30 09:00:54 -05:00
carlmagnus nordin
4a7d7d277c Implemented -checkpak support for iostore containers
#rnx
#rb pj.kack
#preflight 61a5dd60be6d0d4512d6cd04

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 18322656 via CL 18322665 via CL 18323459 via CL 18323526 via CL 18323898 via CL 18323959
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18323988 by carlmagnus nordin in ue5-release-engine-test branch]
2021-11-30 09:00:43 -05:00
danny couture
70f7ab223d Remove spikes of untagged memory for iostore requests
#rb CarlMagnus.Nordin

#ROBOMERGE-AUTHOR: danny.couture
#ROBOMERGE-SOURCE: CL 18291846 in //UE5/Release-5.0/... via CL 18291860
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18291875 by danny couture in ue5-release-engine-test branch]
2021-11-24 22:03:56 -05:00