Commit Graph

11344 Commits

Author SHA1 Message Date
wouter dek
23caecbe07 Fix clang win64 linker error due to missing CORE_API in TLargeWorldRenderScalar
#jira none
#rb trivial
#preflight 636cc0a64d3c1d9d92862aeb

[CL 23073661 by wouter dek in ue5-main branch]
2022-11-10 04:49:08 -05:00
henrik karlsson
b6e84d16d3 [Core]
* Attempt at fixing static analysis errors in Tuple

#rb none
#jira none
#preflight skipped

[CL 23071760 by henrik karlsson in ue5-main branch]
2022-11-10 01:03:25 -05:00
jonathan bard
08e482fca9 Added support for landscape material instances (per-component MICs) for Nanite landscape:
* Refactored ExportToRawMesh function to allow exporting one mesh section per component
* Implemented support for UV mappings usually provided by the landscape vertex factory in the non-Nanite case (as per the LandscapeLayerCoords material expression + others)
* For Nanite landscape materials, the relevant UV channels are :
** Texcoords0-2 : TerrainCoordMapping_XY, TerrainCoordMapping_XZ, TerrainCoordMapping_YZ (note : TerrainCoordMapping_XZ doesn't work ATM because texcoords1 seems to be a special case...)
** Texcoords3 : WeightmapUV
** Texcoords4 : LightmapUV (not implemented by ExportToRawMesh yet and not supported by Nanite meshes ATM : max 4 UV channels)
** Texcoords5 : HeightmapUV (implemented by ExportToRawMesh but not supported by Nanite meshes ATM : max 4 UV channels)
* Nanite landscape meshes now have 1 polygroup per component, with the proper landscape material instance being assigned to it
* Since Nanite meshes are capped at 64 meshes per section, Nanite landscape mesh will now fail to build on proxies sporting more than this amount of components. This is a first implementation and can be fixed later by adding as many Nanite landscape components as needed
* Implemented some missing virtual overrides on FLandscapeMaterialResource leading to landscape material instances potentially being used for non-landscape usages (hair, etc.)
* Fixed LandscapeNaniteComponent not being attached to the root component (and the mesh being exported in world space coordinates), leading to it not following when moving the  actor
* Added NaniteLODIndex property in ALandscape to be able to tweak the LOD level used when generating the Nanite meshes. It's mostly a debug feature to test the LODLevel > 0 landscape mesh export and to accelerate the Nanite landscape mesh generation since you usually want Nanite to be the most defined mesh possible
* All Nanite landscape meshes will be auto-invalidated by this change

#rb roey.borsteinas, graham.wihlidal
#preflight 6365e2a2882365b8590525ac
#lockdown marc.audy

[CL 23069843 by jonathan bard in ue5-main branch]
2022-11-09 21:04:18 -05:00
steve robb
6d3bffb16f Removed MoveWillEmptyContainer and TContainerTraits.
#rb devin.doucette
#preflight 636ad172ed07daaa9a2e6d2f

[CL 23069446 by steve robb in ue5-main branch]
2022-11-09 20:54:45 -05:00
joe pribele
0926a226cf removed PRAGMA_DISABLE_OPTIMZATIONS that appear to be left in by accident
#rb zousar.shaker
#preflight 636c1c6f7c2b50519028f593

[CL 23063526 by joe pribele in ue5-main branch]
2022-11-09 16:47:19 -05:00
Devin Doucette
70633f0cc9 Fixed thread safety of Engine.Sup[p]ressWarningsInOnScreenDisplay
#preflight 636be5054d3c1d9d9243e1c0
#rb Zousar.Shaker

[CL 23059382 by Devin Doucette in ue5-main branch]
2022-11-09 14:01:43 -05:00
Andriy Tylychko
ac9fc68ce4 removed duplicated include
#rb trivial
#preflight trivial

[CL 23051528 by Andriy Tylychko in ue5-main branch]
2022-11-09 08:10:08 -05:00
henrik karlsson
d7432ab06a [Engine]
* Attempt at fixing Tuple static analysis farm error

#rb none
#jira none
#preflight skipped

[CL 23048344 by henrik karlsson in ue5-main branch]
2022-11-09 00:01:06 -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
jamie dale
8e34ecadf6 Fixed ControlFlow TSharedFromThis deduction for derived types
struct Foo : public TSharedFromThis<Foo>
{
    // ...
};

struct Bar : public Foo
{
    // ...

    void Execute()
    {
        FControlFlow& ControlFlow = ...;
        ControlFlow.QueueStep(this, &Bar::DoStep);
    }

    void DoStep()
    {
    }
};

The QueueStep deduction would fail as it expects the type to be directly derived as TSharedFromThis<Bar> rather than indirectly via TSharedFromThis<Foo>

#preflight 636a7040dc30a4ce96a157a7
[FYI] Geoffrey.Wong
#rb Steve.Robb
#rnx

[CL 23039132 by jamie dale in ue5-main branch]
2022-11-08 16:02:15 -05:00
steve robb
9d96ffe49d Fixed CopyTemp returning a reference instead of a copy when passed an rvalue reference (can cause dangling references).
#rb devin.doucette
#preflight 63644c5a581dc906bca5ddab

[CL 23039113 by steve robb in ue5-main branch]
2022-11-08 16:01:58 -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
henrik karlsson
4feb09e0b3 Compile time optimizations Managed to reduce unnamed game's biggest file compiler frontend cost from 113 seconds to 60 seconds. This also impact other things such as pch size and memory footprint when compiling which is great.
Takeaways. Try to use "friend" on functions/operators that are frequently overloaded EXCEPT if they are in a templated type that is frequently instantiated. So do not put friends in TMap, TSet, TObjectPtr etc, this will slow down compile times. There is a break-even somewhere and hard to tell where it is but taking a class that is templatized on character type probably don't matter either way and then it is nicer to use a friend since that simplies error messages when compiler can't resolve functions/operators.

If it is possible to use member functions instead of friend that is the best option in terms of compile time performance. With c++20 you only have to write operator==(Foo, Bar) and the compiler will automatically provide operator==(Bar, Foo), operator!=(Foo, Bar) and operator!=(Bar, Foo).

Changes in this changelist involes
* Making operator<< friends in non-template types and not friends in template types
* Making operator==/!= members where possible and if not possible moved out if type is a frequently instantiated templated type.

#preflight 636970f5376a9cd6a80da54a
#rb steve.robb

[CL 23038965 by henrik karlsson in ue5-main branch]
2022-11-08 15:59:46 -05:00
Matt Peters
22cb6cec34 LLM: Change ENABLE_LOW_LEVEL_MEM_TRACKER to not be separately definable, and make LLM_ENABLED_IN_CONFIG separately definable instead. This is necessary because ENABLE_LOW_LEVEL_MEM_TRACKER can only be true if LLM_ENABLED_IN_CONFIG is also true, because c-language files include the definition of LLM_ENABLED_IN_CONFIG but cannot include the platform-specific definition of ENABLE_LOW_LEVEL_MEM_TRACKER.
#rb Devin.Doucette
#rnx
#preflight 636abd377c2b505190b898a8

[CL 23038845 by Matt Peters in ue5-main branch]
2022-11-08 15:57:03 -05:00
dmytro vovk
0f910a3c9c Allow a project to redefine default TSetAllocator's number of elements per bucket
#rb Steve.Robb

[CL 23026948 by dmytro vovk in ue5-main branch]
2022-11-08 08:33:46 -05:00
wouter dek
a8b3f8bcf4 Fix incorrect LWC error tolerance assert in TLargeWorldRenderScalar.
#jira UE-169394
#preflight 636a373ff56cab38c713bb47
#rb none

[CL 23026317 by wouter dek in ue5-main branch]
2022-11-08 07:11:53 -05:00
arne schober
f6213d45f8 Add extra debug info for Task destruction
#preflight 63696e3e7c2b505190592030

[CL 23025411 by arne schober in ue5-main branch]
2022-11-08 04:27:17 -05:00
joe kirchoff
7e43f5851a Fix Hololens /permissive- conformance issues
static_cast swtich values, only init one union member
#rnx
#rb Henrik.Karlsson

[CL 23025410 by joe kirchoff in ue5-main branch]
2022-11-08 04:27:13 -05:00
charles bloom
f4f3b76663 FTexture : set debug shader bGreyScaleFormat ReplicateR property from CompressionSettings, not PixelFormat, so it matches what MaterialExpressions wil do
bGreyScaleFormat is only used by debug/editor shaders, game runtime uses SamplerType from MaterialExpressions
bGreyScaleFormat bool is needed because FTexture does not have access to CompressionSettings
behavior is observably different with Grayscale G16 and cases like TC_Alpha non-multiple-of-4

#preflight 636968d6d0174259ccea87f5
#rb dan.thompson

[CL 23023252 by charles bloom in ue5-main branch]
2022-11-07 21:47:57 -05:00
andrew ladenberger
bd4deae0a0 [CSV Profiler] Removed personal data and free text from shipping builds for privacy rules
#rb ben.woodhouse, tyler.staples, jordan.cristiano
[FYI] sarah.noonan, jeff.needles, chris.tran

[CL 23020978 by andrew ladenberger in ue5-main branch]
2022-11-07 18:17:24 -05:00
devin doucette
b4e8190824 StringView: Moved functions and operators to be hidden friends where possible
#preflight 63693924376a9cd6a8f632f7
#rb Steve.Robb
#rnx

[CL 23018539 by devin doucette in ue5-main branch]
2022-11-07 16:54:21 -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
wouter dek
d6306dede8 Fix static analyzer warnings for clipboard copy and float casts
#rb trivial
#preflight none

[CL 22994720 by wouter dek in ue5-main branch]
2022-11-04 16:40:38 -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
chris varnsverry
4e6efc9db8 - Add ExecutableName to startup log messages
#rb Rob.Cannaday
#preflight 636524564b0e01486a58cfef

[CL 22989406 by chris varnsverry in ue5-main branch]
2022-11-04 12:37:38 -04:00