#jira none
#rb none
#ushell-cherrypick of 12997588 by PJ.Kack
#ROBOMERGE-SOURCE: CL 12997796 in //UE4/Release-4.25Plus/... via CL 12997808
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)
[CL 12997823 by pj kack in Main branch]
#jira none
#rb devin.doucette, stefan.boberg
#lockdown stefan.boberg
#ushell-cherrypick of 12918250 by paul.chipchase
#ROBOMERGE-SOURCE: CL 12919209 in //UE4/Release-4.25Plus/... via CL 12919222
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)
[CL 12919263 by paul chipchase in Main branch]
Sets ArIsError and ArIsCriticalError to private
[at]Graeme.Thornton [at]Johan.Torp [at]Steve.Robb [at]Carlos.Cuello
#rb Steve.Robb
#ROBOMERGE-OWNER: Eric.Knapik
#ROBOMERGE-AUTHOR: eric.knapik
#ROBOMERGE-SOURCE: CL 11949030 via CL 11949058 via CL 11949116 via CL 11949174
#ROBOMERGE-BOT: (v656-11643781)
[CL 11953024 by Eric Knapik in Main branch]
- Attempting to memory map inline data will give a log error(as the original implementation did but will not attempt to actually memory map it as it is very unlikely that inline data would have the correct alignment requirements for the operation to succeed so to keep the code simple we just serialize the inline data which was the existing fallback behaviour anyway.
- Added the memory mapping implementation as it's own method (MemoryMapBulkData) since we only need to support the non-inline case.
- Added a flag (bShouldForceLoad) that when true will force the BulkData2 data to be streamed in immediately. Currently used as a fallback if the memory mapping fails (all callers assume 100% success) but I made it generic enough that we could use it for something else if the use case occurs.
- This is a fairly quick fix to unblock testing, future work includes:
- Reduce the added memory bloat (adding 2 additional pointers to BulkData2)
- Implement copy/assignment of memory mapped BulkData (based on the above work)
#jira UE-85974
#rnx
#rb Per.Larsson
[CL 11194361 by paul chipchase in Main branch]
I was using the original FIoChunkId (ie the non optional data) to check if the duplicate optional data existed, to fix this I now load the duplicate data values first then use them to create the potential FIoChunkId then apply them if we pass the correct existance check.
I also moved the code to it's own method to hide the implementation a bit since most project/platforms don't use this path and so people don't need to worry about it.
#rnx
#rb none
[CL 11128432 by paul chipchase in Dev-Core branch]
- Was caused by a special case check to allow inline data to unload when using the IoDispatcher since technically it cannot be loaded from disk which was blocking it from being discarded. However runtime created bulkdata would often class as 'inline' which although having no file reference, started returning true when ::CanLoadFromDisk was called
- ::GetCopy now uses ::CanDiscardInternalData to determine if we can discard the internal data (we should probably change ::Unlock to do this as well but that is a different work item)
- Moved the special case code for inline data when running with the IoDispatcher from ::CanLoadFromDisk to ::CanDiscardInternalData.
#rb none
#rnx
#jira UE-87296
[CL 11091798 by paul chipchase in Dev-Core branch]
Note that this will invalidating existing manifests and require a new cook!
- We have had several cases of EIoChunkType having new entries inserted at the start causing the values for bulkdata to change which in turn would invalidate the contents of the BulkData manifest, so to avoid issues in the future the manifest will now save out its own values and we only convert them to EIoChunkType at the last possible moment when building the ucas files.
- Added a custom version to the manifests file archive, this will make it safer to edit the format in the future as we will be able to avoid invalidating the entire file.
- Unfortunatly adding the version does not help with existing files which are now invalid.
#rb CarlMagnus.Nordin
#rnx
[CL 11042093 by paul chipchase in Dev-Core branch]
The VT system already has its own very specialised file handling so rather than try to refactor that it seemed safer to implement a version of IAsyncReadFileHandle that can handle reading via the IoDispatcher.
At some point we we might want to move this to a header file so other system can use it but for now it is local to the new BulkData api.
Add an accessor FBulkDataBase::GettIODispatcher so that FBulkDataIoDispatcherRequest no longer needs to be a friend class.
#rb CarlMagnus.Nordin
[CL 10927048 by paul chipchase in Dev-Core branch]
FBulkDataIORequest was only returning a valid size if its IAsyncReadRequest polled as completed, but the request would only be counted as 'completed' once it's callback had finished, meaning that calling ::GetSize during the callback would not work.
However in the case of the StaticMesh, the callback would schedule ::SerializeLODData to be called on the task graph, which if processed immediately could occur before the request was marked as completed.
Removed the unused constructor for FBulkDataIORequest and set the Size to INDEX_NONE by default and move the constructor to the cpp.
To fix the actual problem we now set Size to the number of bytes in the buffer int he internal callback (ie the moment the buffer becomes valid) and then always just return Size so it will work properly before the request is marked as completed.
Remove the work around for the original issue (a check to wait for the request to finish before the request is used by the StaticMesh streaming system)
#jira UE-85675
#rb brian.white, jian.ru
#ushell-cherrypick of 10906085 by paul.chipchase
[CL 10906181 by paul chipchase in Main branch]