#rb per.larsson
#ushell-cherrypick of 11327342 by CarlMagnus.Nordin
#ROBOMERGE-SOURCE: CL 11373304 via CL 11373313 via CL 11373318
#ROBOMERGE-BOT: (v654-11333218)
[CL 11373323 by carlmagnus nordin in Main branch]
#rb none
[FYI] ken.hawthorne
#ROBOMERGE-SOURCE: CL 11254859 via CL 11255081 via CL 11255096
#ROBOMERGE-BOT: (v647-11244347)
[CL 11255345 by steve robb in Main branch]
#rb none
#rnx
#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 11199407 via CL 11199413
#ROBOMERGE-BOT: (v640-11091645)
[CL 11199461 by steve robb in Main branch]
#rb none
#rnx
#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 11198904 via CL 11198913
#ROBOMERGE-BOT: (v640-11091645)
[CL 11199047 by steve robb in Main branch]
#rb none
#rnx
#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 11197939 via CL 11197966
#ROBOMERGE-BOT: (v640-11091645)
[CL 11198535 by steve robb 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]
#jira
[FYI] Steve.Robb
#ROBOMERGE-SOURCE: CL 11128612 via CL 11128617 via CL 11128620
#ROBOMERGE-BOT: (v640-11091645)
[CL 11128623 by peter knepley 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]
[FYI] Steve.Robb
#ROBOMERGE-SOURCE: CL 11118680 via CL 11118755 via CL 11118791
#ROBOMERGE-BOT: (v640-11091645)
[CL 11118983 by peter knepley in Main branch]
- The use case is that the enterprise team want to be able to load .udsmesh files at runtime.
- If the archive has lazy loading disabled and the Bulkdata is inline OR in a different file then we don't need to treat the serialization any differently than when lazy loading is enabled.
- If lazy loading is disabled but the data is at the end of the current archive then we need to serialize the data immediately by seeking, serializing and then seeking back to the original position.
- This is because we will not get another chance to load the data (if lazy loading is disabled then the life time of the archive is going to be limited)
- Unlike the old Bulkdata we avoid branching on the archive type and only implement the very specific behaviour we need
- This means that a nullptr linker is now a valid value so the assert has changed to an if statement
- Likewise, the filename being nulllptr is also expected so the assert has changed to an if statement.
#rnx
#rb none
#fyi Johan.Duparc
[CL 11103761 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]
- LoadDataDirectly now branches to the older file system if the IoDispatcher is disabled
- Implement a direct loading path from the IoDispatcher for non-inline data
- Log an error if someone tries to directly load inline data via the IoDipatcher as we do not and will not support that (although I do have a code shelf ready for it just in case)
- Re-enabled the perf warning about reloading inline bulkdata as a start towards removing this functionality as we cannot support it in the IoDisptcher without adding memory bloat and it is not desirable in the first place.
- Removed the malloc call in GetCopy before LoadDataDirectly since that method will allocate the buffer if needed anyway, this ends up being a small optimization by reducing the number of calls to ::GetBulkDataSize
#rnx
#rb none
#jira UE-87094
[CL 11082679 by paul chipchase in Dev-Core branch]
Properly handle load requests for temp packages that are already completed with a simple warning log.
Add an extra call toMarkAsFullyLoaded after finish objects (just as in the old loader), not actually required but probably nice to keep that behavior if some other code relies on it.
#rb none
[CL 11080538 by PJ Kack in Dev-Core branch]