Commit Graph

937 Commits

Author SHA1 Message Date
Dan Thompson
fa34918d88 Update the texture build to route new information out:
1. Whether the source mips detects alpha
2. Several hashes to track the state of data at various stages of the build process.

Move the r.SharedLinearTextureEncoding out of the ConsoleManager as that's The Old Way.
Rename TextureDerivedDataVersion for uniqueness.
#rb devin.doucette
#rb charles.bloom
#preflight 6377fca7815e4b9b75681765

[CL 23206768 by Dan Thompson in ue5-main branch]
2022-11-18 17:09:58 -05:00
florin pascu
76d38017d7 Added ECVF_ExcludeFromPreview to exclude ECVF_Scalability Cvars from the preview
#rb Josh.Adams, Jack.Porter
#jira UE-170009
#preflight 63749013953c19d435dc0d1b

[CL 23151913 by florin pascu in ue5-main branch]
2022-11-16 05:02:20 -05:00
henrik karlsson
56e354a63e [Core]
* Fixed so all headers that are supposed to be included independently can compile (there are headers that must be included through other headers)

* Added HEADER_UNIT_SKIP to headers that must be included through others

* Added HEADER_UNIT_UNSUPPORTED to headers that are not supported by platform but is part of the include list anyway (files in Clang folder and pthread files).

* Added HEADER_UNIT_UNSUPPORTED to headers that have bad dependencies and include files from modules they don't depend on. (KeyChainUtilities.h and PackageWriter.h)

#preflight 637281309e3bea8079feb733
#rb devin.doucette

[CL 23127795 by henrik karlsson in ue5-main branch]
2022-11-14 17:08:04 -05:00
steve robb
1e5cb9a75c Removed legacy TAllocatorTraits::SupportsMove, which is assumed to be always be true everywhere it is used.
#rb
#preflight 636ab1e6843e6ac794dae0dc

[CL 23041494 by steve robb in ue5-main branch]
2022-11-08 17:17:09 -05:00
mickael gilabert
105028e1ec - Added GetRefreshLowLevelAllocatorDelegate so low level allocator could readjust their internal pool / cache in runtime if needed
- LargePageAllocator does all its preallocation handling in its Refresh method (invoked via delegate) thanks to cvars. If preallocated pools are larger than the new requested size, the pool is shrinked (and physical memory freed), if it is smaller then the pool is grown (and more memory will be preallocated)
- First preallocation is done at PreInit once all the INI files have been read on platforms that use very large page allocator
- If a OOM happens, the preallocation code is then be disabled until the title is restarted
- With this system, pools can be tweaked per device profile
- Preallocated pools are tagged as FMalloc in LLM

[REVIEW] [at]john.huelin, [at]robert.millar

[CL 23039063 by mickael gilabert in ue5-main branch]
2022-11-08 16:01:22 -05:00
mickael gilabert
c142ec5097 Fixed NonUnity build (missing include)
#jira UE-169299
#rb trivial
#rnx

[CL 22994741 by mickael gilabert in ue5-main branch]
2022-11-04 16:41:13 -04:00
henrik karlsson
432c3ce257 Fixed non-unity/pch errors
#rb none
#jira none
#preflight skipped

[CL 22991080 by henrik karlsson in ue5-main branch]
2022-11-04 13:55:45 -04:00
henrik karlsson
f58ebc3775 [Core]
* CachedOSVeryLargePageAllocator - Attempt to fix compile error

#rb none
#jira none
#preflight skipped

[CL 22975520 by henrik karlsson in ue5-main branch]
2022-11-03 22:50:31 -04:00
mickael gilabert
4a862e9611 LargePageAllocator cache size bucket is now driven via cvar
[REVIEW] [at]john.huelin
#rnx

[CL 22969755 by mickael gilabert in ue5-main branch]
2022-11-03 18:43:20 -04:00
Tim Smith
fa7f102808 If a console variable changes compilation module during live coding, the engine will no longer assert.
#rb rob.millar
#jira UE-168416
#preflight 6363b01e522c8f7ab38ac34f

[CL 22951084 by Tim Smith in ue5-main branch]
2022-11-03 08:19:59 -04:00
mickael gilabert
50ba24b627 Large page allocator can preallocate a specific amount of memory and keep it for its usage (to avoid physical page defragmentation on certain platforms). If title might need memory, the unused memory of large page allocator will be trimmed
[REVIEW] [at]john.huelin, [at]eric.mcdaniel
#rnx

[CL 22937911 by mickael gilabert in ue5-main branch]
2022-11-02 23:06:38 -04:00
Matt Peters
8b82c5d515 Mimalloc changes to support LLM:
Define MI_USE_EXTERNAL_ALLOCATORS and override mimalloc's call to VirtualAlloc/VirtualFree to record the amount committed/decommitted to LLM.
#rb Danny.Couture
#rn LLM, Minor
#preflight 6362cb579160784fc327dbc3

[CL 22926014 by Matt Peters in ue5-main branch]
2022-11-02 16:38:07 -04:00
graeme thornton
e7986ac620 [Backout] - CL22808749
[FYI] Steve.Robb
Original CL Desc
-----------------------------------------------------------------
TMap and TSet can now be declared as members with forward-declared key and value parameters.
KeyFuncs::KeyInitType and KeyFuncs::ElementInitType typedefs are no longer used and user-defined KeyFuncs do not need to provide them.  Deprecated placeholders for these typedefs exist though they may not be defined exactly as they were before.  A new KeyType typedef needs to be provided by custom KeyFuncs which don't already inherit from BaseKeyFuncs or TDefaultMapKeyFuncs.
KeyConstPointerType, KeyInitType, ValueInitType and ElementInitType typedefs have been deprecated across TMap, TSet and TSortedMap.  Regular C++ parameter-passing semantics should be used instead (const T& Ref or T Value, depending on T).
Added missing FSetElementId::operator!=().

[FYI] steve.robb
#rb james.hopkin
[FYI] henrik.karlsson
#preflight 635a56c15d49a96f7b31938f

[CL 22850782 by graeme thornton in ue5-main branch]
2022-10-29 02:59:59 -04:00
Matt Peters
aae3d924df LowLevelMemTracker: Add OnLowLevelChangeInMemoryUse for systems like MiMalloc that can allocate and free subsets of a single reservation.
#rb Zousar.Shaker
#rnx
#preflight 635af8c71b7de936a52a0dae

[CL 22819478 by Matt Peters in ue5-main branch]
2022-10-27 18:09:38 -04:00
steve robb
e980405a8f TMap and TSet can now be declared as members with forward-declared key and value parameters.
KeyFuncs::KeyInitType and KeyFuncs::ElementInitType typedefs are no longer used and user-defined KeyFuncs do not need to provide them.  Deprecated placeholders for these typedefs exist though they may not be defined exactly as they were before.  A new KeyType typedef needs to be provided by custom KeyFuncs which don't already inherit from BaseKeyFuncs or TDefaultMapKeyFuncs.
KeyConstPointerType, KeyInitType, ValueInitType and ElementInitType typedefs have been deprecated across TMap, TSet and TSortedMap.  Regular C++ parameter-passing semantics should be used instead (const T& Ref or T Value, depending on T).
Added missing FSetElementId::operator!=().

#rb james.hopkin
[FYI] henrik.karlsson
#preflight 635a56c15d49a96f7b31938f

[CL 22810695 by steve robb in ue5-main branch]
2022-10-27 11:20:32 -04:00
Johan Torp
e37f79f282 Fix MB3 Realloc reading out of bounds
Reported by Alexander Barrentine, detected via UBsan

#preflight 635a59636a2a692f5d641983
#jira UE-158831
#rb steve.robb,pj.kack,wojciech.krywult

[CL 22809778 by Johan Torp in ue5-main branch]
2022-10-27 10:36:12 -04:00
Matt Peters
02bc0a2b5b LowLevelMemTracker: Fix corrupted whitespace from bad resolve.
#rb None, trivial
#rnx
#preflight None, whitespace/comments only.

[CL 22808987 by Matt Peters in ue5-main branch]
2022-10-27 09:45:34 -04:00
Matt Peters
e73e48abc3 LowLevelMemTracker: Whitespace and comments normalization to match Core team coding standard.
#rb None, trivial
#rnx
#preflight 635a7f3a0d3a231123c6ebea

[CL 22808402 by Matt Peters in ue5-main branch]
2022-10-27 09:08:32 -04:00
anton dunchev
ed467c75ef Report if llm csv file was not created before crashing.
#rnx
#rb trivial

[CL 22803490 by anton dunchev in ue5-main branch]
2022-10-26 23:18:30 -04:00
David Harvey
b55a10ea43 Modular builds: moved the early memory init for consoles into the appropriate per-platform memory code for better per-platform control.
- fixes a reentrant GCreateMalloc hang on some console platforms.

#jira UE-161550
#rnx
#rb Wojciech.Krywult
#preflight 6357f2ee534c537c5f2a81d3

[CL 22754079 by David Harvey in ue5-main branch]
2022-10-25 13:01:12 -04:00
yiliang siew
fd6f72459d Changing static TArrays to be declared as function statics instead of global class statics in order
to avoid a memory leak.
   #rnx
   #rb Florin.Pascu
      #rb Matt.Peters
#preflight 6350f4608449f85a479db179

[CL 22662474 by yiliang siew in ue5-main branch]
2022-10-20 13:41:15 -04:00
sarah noonan
1a993b9ada *Remove per-frame caching of stats from FPlaformMemory::GetStats and move caching into helper function.
*Update common callers of FPlaformMemory::GetStats to use the helper.
[REVIEW] [at]matt.peters

[CL 22596606 by sarah noonan in ue5-main branch]
2022-10-18 07:22:43 -04:00
evgenii babinets
528585a552 Merging with resolved conflicts on behalf of sarah.noonan. Original CL description:
*Make FPlatformMemory::GetStats cache memory stats per frame to prevent multiple costly platform calls per frame ( by default, has option to request non-cached values ).
*Update some calls to FPlatformMemory::GetStats to specifically request non-cached values.
[REVIEW] [at]evgenii.babinets [at]andrew.ladenberger


#preflight 634a04c0907f4749392d75d0

[CL 22545788 by evgenii babinets in ue5-main branch]
2022-10-14 21:13:08 -04:00
Andriy Tylychko
24c39ec5ec moved a check for successful thread creation and added a message that is supposed to help diagnosing an underlying problem
#jira FORT-521107
#preflight 633d9573d74cbd5504532e9c

[CL 22355371 by Andriy Tylychko in ue5-main branch]
2022-10-05 10:58:19 -04:00
Matt Peters
6ca82a96a5 LLM: Fix bug in LLMMap Iterator that corrupted the tag of each allocation when tags are resorted.
#jira UE-164494
#rb Ionut.Matasaru
#rnx
#preflight 633745dff76de2d4d5c75d65

[CL 22279441 by Matt Peters in ue5-main branch]
2022-09-30 15:59:35 -04:00