Commit Graph

236 Commits

Author SHA1 Message Date
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
Marc Audy
7379fa99c5 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14229157
[CL 14233282 by Marc Audy in ue5-main branch]
2020-09-01 14:07:48 -04:00
Marc Audy
a7c9001a94 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14075166
#rb
#rnx

[CL 14075271 by Marc Audy in ue5-main branch]
2020-08-11 01:36:57 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
Matt Peters
156f358e89 Pakfile pruning - disable by default the stripping of directory names; this was the default in 4.25 and was accidentally changed when changing pakfile indexes to strip directory names on load.
#rb Graeme.Thornton

#ushell-cherrypick of 13679152 by Matt.Peters

[CL 13720939 by Matt Peters in ue5-main branch]
2020-06-19 15:37:37 -04:00
Matt Kuhlenschmidt
603a4119c5 Fix HAL/PlatformFileManager.h non-portable casing CIS issues
#rb none

[CL 13214257 by Matt Kuhlenschmidt in ue5-main branch]
2020-05-06 17:58:18 -04:00
jeff newquist
5969077fc4 Added volatile keyword to WaitCompletionImpl to ensure compilers don't just optimize the check away.
#rb rune.stubbe
#jira none
#rnx

#ROBOMERGE-SOURCE: CL 13007135 in //UE4/Release-4.25/... via CL 13007150 via CL 13007159
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 13007166 by jeff newquist in Main branch]
2020-04-23 11:00:55 -04:00
jeff newquist
9fa4defb8c Fixed all size variants of IAsyncReadRequest so they correctly wait inside of WaitCompletionImpl for a callback to be completed before returning.
Normal read requests have this behavior, but size requests were not respecting this, which caused problems when the constructor launches a callback on another thread and then immediately calls WaitCompletion, such as in the callback lambda inside FFileCacheHandle::FFileCacheHandle / PushCompletedRequest.
#rb rune.stubbe
#jira none
#rnx

#ROBOMERGE-SOURCE: CL 12974187 in //UE4/Release-4.25/... via CL 12974195 via CL 12974203
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12974208 by jeff newquist in Main branch]
2020-04-22 09:27:31 -04:00
carlmagnus nordin
373fd671f7 Copying //UE4/Release-4.25Plus-Dev to Release-4.25Plus (//UE4/Release-4.25Plus)
#rnx
#jira none
#rb none

#ROBOMERGE-OWNER: carlmagnus.nordin
#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 12973630 in //UE4/Release-4.25Plus/... via CL 12973644
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12973696 by carlmagnus nordin in Main branch]
2020-04-22 06:25:12 -04:00
matt peters
51f2ddfc2f #rb Graeme.Thornton
[RN] Minor, PakFiles

#ROBOMERGE-SOURCE: CL 12502978 via CL 12502983 via CL 12502984
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12502987 by matt peters in Main branch]
2020-03-31 19:02:11 -04:00
johan torp
53df220e4d Redo FArchiveProxy error propagation fix
#rb steve.robb


#ROBOMERGE-SOURCE: CL 12450992 via CL 12450999 via CL 12457993
#ROBOMERGE-BOT: (v672-12450963)

[CL 12458149 by johan torp in Release-Engine-Staging branch]
2020-03-26 16:42:07 -04:00
david hamm
565e716a08 Backout CL 12371098 per discussion, Johan to investigate
[FYI] johan.torp, steve.robb, eric.knapik
#rnx


#ROBOMERGE-SOURCE: CL 12434782 via CL 12434783 via CL 12437070
#ROBOMERGE-BOT: (v671-12333473)

[CL 12443982 by david hamm in Release-Engine-Staging branch]
2020-03-26 07:49:42 -04:00
johan torp
057f7ae5b7 FArchive error propagation to all proxies
#rb steve.robb, eric.knapik


#ROBOMERGE-SOURCE: CL 12371098 via CL 12372591 via CL 12388959
#ROBOMERGE-BOT: (v671-12333473)

[CL 12390565 by johan torp in Release-Engine-Staging branch]
2020-03-24 14:30:03 -04:00
Matt Peters
4783327951 #jira UE-90069
Legacy pak file versions encode pak entries in FPakFile::LoadLegacyIndex. That function repeatedly serializes bytes from the pakfile on disk into a reused FPakEntry. Serialize expects the FPakEntry to be in an empty constructed state, and it was not empty due to serializing previous PakEntries into it.
Added a reset function and call it in this one place where FPakEntry is reused.
#rb Graeme.Thornton
#rnx

[CL 12000363 by Matt Peters in Main branch]
2020-03-06 10:39:13 -05:00
thomas ross
d5ca9d72e2 No longer load verify data if verify code is turned off.
#rb none
#testing iOS Client


#ROBOMERGE-SOURCE: CL 11843182 via CL 11843195 via CL 11843203
#ROBOMERGE-BOT: (v656-11643781)

[CL 11879820 by thomas ross in Main branch]
2020-03-03 14:31:00 -05:00
paul chipchase
227893a8f9 Fix a potential deadlock when loading from packfiles
This was originally fixed in CL 11458603 but it did not fix the issue entirely and in any case I was not happy with the manual reset event approach.
The problem with the manual reset event was that there is no actual safe point at which we can reset the event without risking some requesting thread missing it and waiting forever, it is just a lot rarer than the original thread lock.

- Each FChunkRequest now can be given an event that is triggered, so the correct thread is always woken up if waiting.
- Since the signals are 1-1 we no longer risk having threads never being woken.
- We only wake the thread that has a request to process so don't risk flooding the cpu.
- Removed FChunkCacheWorker::SetupDecryptionKey as it was not implemented/used.
- Removed FChunkCacheWorker::ChunkRequestAvailable and its associated methods ::WaitForNextChunk/::FlushRemainingChunkCompletionEvents.

In testing this version runs slightly faster on loading tests (0.2seconds on average), although just removing the events entirely and running a busy loop with a yield ran slightly faster on machines with less cores (4 cores with hyperthreading or less) albiet with a much higher variation and so potentially could end up a lot worse.

#rb Graeme.Thornton
#jira UE-89165


#ushell-cherrypick of 11724338 by paul.chipchase

#ROBOMERGE-SOURCE: CL 11724753 in //UE4/Release-4.25/... via CL 11724760
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)

[CL 11724764 by paul chipchase in Main branch]
2020-02-28 05:04:42 -05:00
matt peters
f9fc7dd5e4 #jira UE-88959 Fix includes-after-first-code-block static analysis warning.
#rb trivial
#rnx


#ROBOMERGE-SOURCE: CL 11498882 via CL 11499002
#ROBOMERGE-BOT: (v654-11333218)

[CL 11499043 by matt peters in Main branch]
2020-02-18 10:07:44 -05:00
matt peters
913830a60a #jira UE-88844
Fix incorrect use of static constexpr without inline.
#rb trivial
#rnx


#ROBOMERGE-SOURCE: CL 11465526 via CL 11465539
#ROBOMERGE-BOT: (v654-11333218)

[CL 11465545 by matt peters in Main branch]
2020-02-17 16:08:12 -05:00
paul chipchase
e9c45ad063 Fix a deadlock when loading the ShooterGame sample from a packaged build.
FChunkCacheWorker::ChunkRequestAvailable could have many threads waiting on it and would only wake up a single thread each time a FChunkBuffer is processed. There would be no guarantee that the correct thread would be woken up or that each thread would be woken a single time, meaning that sooner or later we would end up with the FChunkCacheWorker having no more work to process but a number of threads still idle, waiting on the event to wake them, which would never happen.

Switching to a manually reset event will cause all waiting threads to be woken each time the event is triggered and will make sure that we don't deadlock.
This issue showed up now due to changes else where in the code which resulted in more threads waiting on FChunkCacheWorker than we previously had.

#jira UE-88734
#rb graeme.thornton

#ROBOMERGE-SOURCE: CL 11458603 in //UE4/Release-4.25/... via CL 11458605
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v654-11333218)

[CL 11462181 by paul chipchase in Main branch]
2020-02-17 14:19:54 -05:00
paul chipchase
22c70fc5c7 Fix a deadlock when loading the ShooterGame sample from a packaged build.
FChunkCacheWorker::ChunkRequestAvailable could have many threads waiting on it and would only wake up a single thread each time a FChunkBuffer is processed. There would be no guarantee that the correct thread would be woken up or that each thread would be woken a single time, meaning that sooner or later we would end up with the FChunkCacheWorker having no more work to process but a number of threads still idle, waiting on the event to wake them, which would never happen.

Switching to a manually reset event will cause all waiting threads to be woken each time the event is triggered and will make sure that we don't deadlock.
This issue showed up now due to changes else where in the code which resulted in more threads waiting on FChunkCacheWorker than we previously had.

#jira UE-88734
#rb graeme.thornton

#ROBOMERGE-SOURCE: CL 11458603 in //UE4/Release-4.25/...
#ROBOMERGE-BOT: RELEASE (Release-4.25 -> Release-4.25Plus) (v654-11333218)

[CL 11458605 by paul chipchase in 4.25-Plus branch]
2020-02-17 01:57:21 -05:00
Matt Peters
9462da8501 Revert the invalidation of revision PakFile_Version_FrozenIndex; that change was incorrectly merged to main.
#rb trivial
#rnx

[CL 11458172 by Matt Peters in Main branch]
2020-02-16 19:01:38 -05:00
matt peters
79a6482923 Fix localization not detecting the existance of some localization files and falling back to english for those files. FPakFile::NormalizeDirectoryQuery was incorrectly returning false when queried for whether the MountPoint exists.
#ROBOMERGE-SOURCE: CL 11458135 via CL 11458136 via CL 11458137 via CL 11458138
#ROBOMERGE-BOT: (v654-11333218)

[CL 11458139 by matt peters in Main branch]
2020-02-16 18:36:33 -05:00
matt peters
6572e7beb4 [REVIEW-11458122]
OptimizedPakIndex: Bump the PakIndex version from 9 to 10, to avoid conflict with PakFile_Version_FrozenIndex = 9 from mainline.  This change will remain in Fortnite only, and unlike UE::Main will refuse to load version 9 paks.  This change can be clobbered with UE::Main's version after a few days when we have deleted all of our version 9 paks.


#ROBOMERGE-SOURCE: CL 11458117 via CL 11458118 via CL 11458119 via CL 11458120
#ROBOMERGE-BOT: (v654-11333218)

[CL 11458121 by matt peters in Main branch]
2020-02-16 18:30:09 -05:00
Matt Peters
40f55732ba #jira FORT-236167
[REVIEW]
#rb Graeme.Thornton
Optimize Pak file indices by computing the PathHashIndex in unrealpak rather than using strings at runtime.
This also removes the need to shrink the string indices for performance, which was triggering a bug due to unsynchronized multithreaded access.

#ROBOMERGE-SOURCE: CL 11442058 in //Fortnite/Release-12.00/... via CL 11442063 via CL 11442073 via CL 11442081

[CL 11443295 by Matt Peters in Main branch]
2020-02-14 09:53:05 -05:00
graeme thornton
a224a3f8dd Fix for signature checking related issues
#rb steve.robb


#ROBOMERGE-SOURCE: CL 11303014 via CL 11303031 via CL 11303037 via CL 11303042
#ROBOMERGE-BOT: (v0-11244347)

[CL 11303201 by graeme thornton in Main branch]
2020-02-10 08:11:47 -05:00