Commit Graph

134 Commits

Author SHA1 Message Date
Matt Peters
02ba0b5b70 ZenStoreWriter: Fix assertion "Trying to add package that is already pending" if the cooker commits a package a second time while the first commit of the package is queued for asynchronous completion aand has not yet reached CommitPackageInternal.
This is necessary because as of CL 20151503, the cooker can commit the same package multiple times if the first save failed due to a timeout.

#fyi CarlMagnus.Nordin
#rnx
#rb Per.Larsson
#preflight 62853ba90f0d5076dee74ced

[CL 20265738 by Matt Peters in ue5-main branch]
2022-05-18 14:49:11 -04:00
josh adams
c9a46d2479 - Fixed typo on printf, I swear I had compiled the editor, I guess not sigh
#rb trivial
#preflight skip

#ROBOMERGE-AUTHOR: josh.adams
#ROBOMERGE-SOURCE: CL 20187446 via CL 20189065 via CL 20189140 via CL 20189159
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20191624 by josh adams in ue5-main branch]
2022-05-13 18:57:37 -04:00
josh adams
e7204af78c - Added some more debugging for dealing with missing EditorOptional files going from Client -> Editor
#rb trivial
#preflight skip

#ROBOMERGE-AUTHOR: josh.adams
#ROBOMERGE-SOURCE: CL 20185216 via CL 20189057 via CL 20189126 via CL 20189153
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20191620 by josh adams in ue5-main branch]
2022-05-13 18:57:30 -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
Josh Adams
defdfa230a - Added option for IoStore to write optional files (.o.ucas) to a different directory. This is used when making a a cooked editor as DLC against a client build (the client build has to make the optional editor data, but we do not want to ship the optional data with the client). The MakeCookedEditor script will then copy the files from that location into the editor's Stage directory (under Content/Paks)
#rb carl-magnus.nordin,francis.hurteau
#preflight 6273f8fd8d32cd80d8a8ecdb

[CL 20059504 by Josh Adams in ue5-main branch]
2022-05-05 12:28:59 -04:00
CarlMagnus Nordin
f75f1052e6 IoStore: Fixed non-deterministic shader classification and ordering
#preflight 626134653f4b2bba85007b48
#rb pj.kack

[CL 20021659 by CarlMagnus Nordin in ue5-main branch]
2022-05-03 01:39:34 -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
Johan Torp
ef8e0c4660 Optimize WITH_CASE_PRESERVING_NAME FName loading
LoadDisplayNames() 1.06s -> 0.24s when async loading the name batch in CachedAssetRegistry.bin during editor startup of an internal project

* Introduce FDisplayNameEntryId to avoid cache misses in FName::GetComparisonIdFromDisplayId() lookups
* Force name batch serialization to use display entry ids to help enforce cooking determinism
* Fix determinism problem when loading then saving via FPackageStoreNameMapBuilder
* Inline FNameEntryId::FromUnstableInt()
* Remove slow IsNumbered() check in CreateFromDisplayId when not using 4B FName
* Remove expensive heap sort by sorting up front instead

#rb rob.millar,matt.peters,pj.kack
#preflight 62664bd06968f18d5137d419

[CL 19899104 by Johan Torp in ue5-main branch]
2022-04-25 03:48:33 -04:00
CarlMagnus Nordin
74c1a09f15 IoStore: Fixed race when deleting write queue entries
#preflight 6261337c731f07cd5cc84574
#rb per.larsson

[CL 19846614 by CarlMagnus Nordin in ue5-main branch]
2022-04-21 07:04:03 -04:00
CarlMagnus Nordin
e754071792 IoStore:
Preparation for optional package data support
Some cleanup of the cooked file stat map
Fixed package bulkdata size not being calculated correctly when staging from Zen
#rnx
#preflight 625e5884d412434587d7a51a
#rb pj.kack

[CL 19805462 by CarlMagnus Nordin in ue5-main branch]
2022-04-19 04:49:18 -04:00
Dan Thompson
adcd4a2208 Updating iostore asset registry writeback to use new cleaner functions and use the chunk listing on the asset registry.
#rb fabian.giesen
#preflight 625dacb2691f49969eaff227

[CL 19795732 by Dan Thompson in ue5-main branch]
2022-04-18 17:41:41 -04:00
josh adams
25705eb507 - Added cooker option, -DlcReevaluateUncookedAssets, which will allow a cooked editor to attempt to cook assets that the base game had attempted to cook and skipped, but left in the assetregistry.
#rb matt.peters
#p4v-preflight-copy 19482053
#preflight 624326c1f73c316f68cdd1c2

#ROBOMERGE-OWNER: josh.adams
#ROBOMERGE-AUTHOR: josh.adams
#ROBOMERGE-SOURCE: CL 19544735 via CL 19547423 via CL 19548168 via CL 19548176
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19560883 by josh adams in ue5-main branch]
2022-03-30 14:16:51 -04:00
Per Larsson
82502dbe34 I/O store - fix memory stomp when creating container file(s)
#rb PJ.Kack
#rnx
#preflight manual

[CL 19507265 by Per Larsson in ue5-main branch]
2022-03-25 04:26:55 -04:00
CarlMagnus Nordin
07a8404c48 IoStoreShaderCodeLibrary: Fixed issue with library names containing dashes
#preflight 623c1b9cbc1cf2803885575e
#rb pj.kack

[CL 19495934 by CarlMagnus Nordin in ue5-main branch]
2022-03-24 11:16:24 -04:00
Dan Thompson
132319cba4 Add a way to do the asset registry writeback from container files after staging.
#rb fabian.giesen
#preflight 6234e60484667926da399acf

[CL 19440738 by Dan Thompson in ue5-main branch]
2022-03-18 16:10:10 -04:00
Dan Thompson
809c0f9062 Adding support for writing back metadata to an asset registry during iostore staging. Initially this is size information about the chunks.
#rb matt.peters
#rb carl-magnus.nordin
#preflight 62200571943787f1d2199924

[CL 19234043 by Dan Thompson in ue5-main branch]
2022-03-02 19:22:28 -05:00
CarlMagnus Nordin
52e3f3db01 ZenCook:
Removed several unnecessary files from the file system manifest
Added IoStoreCmdlet utility command for generating the file system manifest
#rnx
#preflight 621772bcdb60b6b59216e62f
#rb per.larsson

[CL 19171203 by CarlMagnus Nordin in ue5-main branch]
2022-02-28 03:11:38 -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
robert millar
5811293e2a Add TargetRules.bFNameOutlineNumber as an option to reduce the size of FName by 4 bytes by storing the number in the name table.
Adds a define UE_FNAME_OUTLINE_NUMBER.
Removes of FName, FMinimalName from memory image support. Adds of FMemoryImageName.
Removal of FMinimalName operator&lt;&lt;, all fields made private, size made variable.
All fields of FScriptName made private.
Added console commands for dumping numbered/unnumbered names and stats.

#rb johan.torp

#ROBOMERGE-OWNER: robert.millar
#ROBOMERGE-AUTHOR: robert.millar
#ROBOMERGE-SOURCE: CL 19058026 via CL 19058611 via CL 19058656 via CL 19061727 via CL 19061740 via CL 19064047
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356)

[CL 19066701 by robert millar in ue5-main branch]
2022-02-21 02:35:48 -05:00
pj kack
aa6459712e Force disable bPakUsesSecondaryOrder for all projects when staging with iostore, i.e. don't use the non-deterministic CookerOpenOrder.log in the UAT stage and package step.
This improves the determinism in iostore packaged builds with no regression in load times.
Game specific ordering .log files are still enabled, so any files located in [GameName]\Build\[CookPlatform]\FileOpenOrder\ will still be used.

#jira none
#rb carlmagnus.nordin
#rnx
#preflight 61f29f04c0033b39f8b92c8b

#ROBOMERGE-AUTHOR: pj.kack
#ROBOMERGE-SOURCE: CL 18752854 in //UE5/Release-5.0/... via CL 18752859 via CL 18756833
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18757113 by pj kack in ue5-main branch]
2022-01-27 14:06:40 -05:00
graeme thornton
fa985cf523 IOStoreUtilities checks for the existance of a development asset registry before trying to load it
[FYI] carlmagnus.nordin

#ROBOMERGE-AUTHOR: graeme.thornton
#ROBOMERGE-SOURCE: CL 18734136 via CL 18734139 via CL 18734144 via CL 18734148 via CL 18734262 via CL 18734289
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18734293 by graeme thornton in ue5-main branch]
2022-01-26 07:38:57 -05:00
arciel rekman
71c0fe40e8 Compress shaders as groups for cooked games.
- Saves disk size and runtime memory on all platforms that use IoStore-based shader archive (on some - significantly).
- Decompression time is small and seems to get lost in noise given how rarely shaders are actually created.
- Also changed IoStore-based archive to allocate preload entries on demand, and disabled preloading singular shaders (used by the PSO cache) as the API needs more work.

#rb CM.Nordin, Serge.Bernier, Ben.Ingram
[REVIEW] [at]CarlMagnus.Nordin, [at]Serge.Bernier, [at]Ben.Ingram

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 18657587 via CL 18657664 via CL 18657670 via CL 18662749 via CL 18662792 via CL 18662871
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18662941 by arciel rekman in ue5-main branch]
2022-01-19 14:35:49 -05:00
francis hurteau
d262daac13 Added support to Loose File Package Writer to write multiple package output per input
Added similar support to the package store manifest
Zen Store support will be added separately
Added some extra data to linker object resources to be used by the iostore package optimizer to properly support optional package chunks.

Multiple cooking outputs is used to support "optional objects" which are editor data package exports that would be put in separate iostore containers than the normal cooked game content.

#jira UE-129801
#rb Matt.Peters, CarlMagnus.Nordin
#preflight 61e5d3bb873f2ea48f48166c

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

[CL 18639762 by francis hurteau in ue5-main branch]
2022-01-18 09:56:23 -05:00
ionut matasaru
1c030f6852 Fixed usage of TCHAR_TO_ANSI in IoStoreUtilities.cpp, PakFileUtilities.cpp and in GeForceNOWWrapper.cpp.
Fixed usage of TCHAR_TO_UTF8 in FbxMainExport (ExportStaticMeshToFbx, ExportSplineMeshToFbx).

#rb CarlMagnus.Nordin
#preflight 61b7589bf42e2f02a8dbedaa

#ROBOMERGE-AUTHOR: ionut.matasaru
#ROBOMERGE-SOURCE: CL 18453463 in //UE5/Release-5.0/... via CL 18453474
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v898-18417669)

[CL 18453477 by ionut matasaru in ue5-release-engine-test branch]
2021-12-14 06:53:29 -05:00