Commit Graph

2055 Commits

Author SHA1 Message Date
ben zeigler
eb53ce238e Remove TagAtLastTest from SoftObjectPtr (and LazyObjectPtr) as it was only used for edge cases involving stale weak pointers and caused bugs when objects are created without calling InvalidateTag
Removing this field saves significant memory and allows removing a per-thread variable to improve performance overall
Fix a redundant dereference in SynchronousLoad and use a faster IsValid function for validating a weak pointer after resolve
#jira UE-187216
#rb robert.millar

[CL 25792946 by ben zeigler in ue5-main branch]
2023-06-05 11:22:03 -04:00
kirill zorin
482cf2d5cd AddReferencedObjects: addressing additional review feedback
#rb johan.torp
#preflight none

[CL 25773530 by kirill zorin in ue5-main branch]
2023-06-02 16:53:45 -04:00
Matt Peters
5493f6daf0 SavePackage EditorOnly detection:
HasNonEditorOnlyReferences needs to be applied to suppress the checking of archetype and class for editoronly. It already applies to suppressing IsNeededForClient=false and IsEditorOnly=true, but checking the archetype+class also needs to be suppressed. This is necessary to support instances of UWidgetBlueprint, because the UWidgetBlueprint type and CDO are in the UMGEditor package and so are editoronly. But instances of UWidgetBlueprint, like instances of UBlueprint, should be treated as not editoronly when saving in editor.

Remove the workaround for WidgetBlueprints that was added in HarvestPackage - harvesting CDOs as toplevel objects even though they are not RF_Standalone.

Related but not vital: Deprecate bCheckMarks argument from IsEditorOnlyObject. SavePackage was the only user and no longer uses it.

#rb Francis.Hurteau
#rnx
#preflight 6477be677f02573726abebf9

[CL 25763169 by Matt Peters in ue5-main branch]
2023-06-02 11:46:36 -04:00
andrew rodham
f9dc589d23 Sequencer: Bitfield boolean properties are now able to use fast property offsets
Bitfields were previously not supported because there was no exposed way of determining how an FBoolProperty is mapped in memory. Using fast pointer offsets would have previously caused us to always stomp a full byte over the address. Since we now support meta-data on property components (which is already used by colors and vectors), we can use the FBoolProperty when resolving the property to detect the bitoffset if FBoolProperty::IsNativeBool is false. (see usage of CountTrailingZeros64 inside FBoolHandler)

For my test this pulls down the cost of assigning boolean flags for PostProcessingOverrides from 15us to 1.7us.

Other miscellaneous changes included:
  - Added a way for traits to tell the component handlers that they are not composite property types. This causes them to use direct property setters rather than requiring a composite temporary, and prevents the handler from instantiating partial property setter code.
  - Moved custom accessor functions into their own file. Added one for ULightComponent::VolumetricScatteringIntensity.

#rb Ludovic.Chabant, Max.Chen
#preflight 647907a6e319748a835fbd06

[CL 25760044 by andrew rodham in ue5-main branch]
2023-06-02 10:12:22 -04:00
kirill zorin
4dafe4fcdc Remove unused file
#rb johan.torp
#preflight none

[CL 25749587 by kirill zorin in ue5-main branch]
2023-06-01 20:28:51 -04:00
joe pribele
f2b80ba74b added GetOuter and GetPackage to FObectPtr and TObjectPtr
changed how the Object Handle index stores info to be able to get the class of the outer objects
Packages dont' store a ObjectPathId or ClassDescriptor as it is always known

https://p4-swarm.epicgames.net/reviews/25378953
#rb zousar.shaker
#preflight 64791957e25209b6cbbb45fc

[CL 25747367 by joe pribele in ue5-main branch]
2023-06-01 18:45:09 -04:00
joe pribele
4a972d82fb moved to #include PrintStaleReferencesOption to its own file for better compile iterations
https://p4-swarm.epicgames.net/reviews/25725441

#rb johan.torp
#preflight 6478f447947ff6973c33b134

[CL 25745328 by joe pribele in ue5-main branch]
2023-06-01 17:57:01 -04:00
steve robb
1001fcc39a Added UE_FORCE_CONSTEVAL macro to cause a constexpr expression to be evaluated at compile time when used as a subexpression of a runtime expression.
Added some usage of the macro around FMath::ConstExprCeilLogTwo.

#rb devin.doucette
#preflight 6478c777c26e3b24490353a0
[FYI] andrew.scheidecker

[CL 25736427 by steve robb in ue5-main branch]
2023-06-01 15:19:25 -04:00
tom waterson
b2a34a684b Add torque units and extend force units
#rb justin.hare
#preflight 647862b85d23eca37d782f2c

[CL 25723425 by tom waterson in ue5-main branch]
2023-06-01 07:44:12 -04:00
johan torp
2a7e437f2c Add FReferenceCollector::AddPropertyReferencesWithStructARO class overload
#rb mikko.mononen
#rnx
#preflight 6470a6dd7e35fee9abb2289e

[CL 25662210 by johan torp in ue5-main branch]
2023-05-29 03:28:57 -04:00
Johan Torp
02f885ff7b Add FReferenceCollector::AddPropertyReferencesWithStructARO class overload
#rb mikko.mononen
#jira none
#rnx
#preflight 6470a6dd7e35fee9abb2289e

[CL 25662181 by Johan Torp in ue5-main branch]
2023-05-29 03:25:33 -04:00
kirill zorin
b6ee3a6c64 Fix UE_LOG callsites that have format string-related UB
#rb trivial
#preflight 647107780a6634dbb236a0a6

[CL 25651638 by kirill zorin in ue5-main branch]
2023-05-26 15:52:39 -04:00
michael nicolella
ff703397ff [autortfm] add initial support for UE_USE_VIRTUAL_STACK_ALLOCATOR_FOR_SCRIPT_VM - when transactional we bypass the stack allocator and fall back to FMemory. To be replaced later by returning to stack allocator behavior after we have runtime support for it
#preflight 646ed010f85111e06cd96407

[CL 25634546 by michael nicolella in ue5-main branch]
2023-05-25 19:20:23 -04:00
jordan hoffmann
99d3c35c3d [Feature] added GetPropertyInstanceWithin to CPPStructOps so that classes like FInstancedStruct can have their internal properties reflected by property paths
#rb dan.oconnor, steve.robb
#preflight 646e2f52807b157b8b3a912e

[CL 25627492 by jordan hoffmann in ue5-main branch]
2023-05-25 16:00:42 -04:00
Andriy Tylychko
2de9cbf131 the issue was fixed in 25607223, so rolling back the rollback
#preflight 646f8f135b484acfee4932fb

[Backout] - CL25597666
#fyi zack.neyland
Original CL Desc
-----------------------------------------------------------------
Reverting CL 25577637, it's is blocking Mac editor from opening entirely.

The failure is coming dyld with the following: "could not create thread local variables pthread key". This occurs during plugin loading.

#preflight 646d775d1b241f0748e75e95
#jira UE-186763

[CL 25623686 by Andriy Tylychko in ue5-main branch]
2023-05-25 12:52:20 -04:00
kirill zorin
ab1759fd1c Turn off access tracking for UStruct::SuperStruct field (optimization)
#rb zousar.shaker
#preflight 646d5c8d3e151fa04ea817e8

[CL 25602565 by kirill zorin in ue5-main branch]
2023-05-24 10:15:48 -04:00
zack neyland
c47a81a427 Reverting CL 25577637, it's is blocking Mac editor from opening entirely.
The failure is coming dyld with the following: "could not create thread local variables pthread key". This occurs during plugin loading.

#preflight 646d775d1b241f0748e75e95
#jira UE-186763

[CL 25597666 by zack neyland in ue5-main branch]
2023-05-23 23:12:39 -04:00
Andriy Tylychko
5c238a4d7e delegates refactoring:
* added a thread-safe (locked) delegates variant
* refactored and enabled by default race detection for the original not thread-safe version
* added "not thread-safe not checked" variant for rare cases where race detection doesn't work or it's a known case of a race
#rb steve.robb, francis.hurteau, danny.couture
#preflight 646b9f4d576becd7b53f674c

[CL 25577637 by Andriy Tylychko in ue5-main branch]
2023-05-23 05:17:19 -04:00
ben woodhouse
31208ca2a1 Add a new set of ASTC pixel formats for storing high precision normals in RG channels. The texture is encoded as LA for higher precision, swizzled to RG at runtime for shader compatibility with BC5. Requires RHI support.
Runtime pixel formats are named  PF_ASTC_<blocksize>_NORM_RG. Use texture format name ASTC_NormalRG_Precise for encoding.

[CL 25563983 by ben woodhouse in ue5-main branch]
2023-05-22 10:41:55 -04:00
Zousar Shaker
4fa84566bb Remove TObjectPtr on UStruct::SuperStruct as it causes a high quantity of access tracking callbacks that are not valuable. Will discuss options to mitigate this while restoring it to a TObjectPtr.
#rb none
#fyi kirill.zorin
#preflight 646a4fd9434f5536a3df9cfe

[CL 25559552 by Zousar Shaker in ue5-main branch]
2023-05-21 13:25:51 -04:00
Zousar Shaker
18ac7c63c1 Ensure that ObjectHandle access tracking has an inline and lockless fast exit path when there are zero handle read callbacks installed.
#rb kirill.zorin
#fyi joe.pribele
#preflight 6469a83264351d76f362c636

[CL 25559510 by Zousar Shaker in ue5-main branch]
2023-05-21 13:01:08 -04:00
joe pribele
f53c64a049 moved FindAndPrintStaleReferencesToObjects from Engine to ReferenceChainSearch. Makes the function usable by CoreUObject
https://p4-swarm.epicgames.net/reviews/25519109

#rb robert.millar

[CL 25536572 by joe pribele in ue5-main branch]
2023-05-18 19:44:56 -04:00
Steve Robb
dd961a1379 Changed multicast delegates to work on empty delegates rather than on the internal invocation list, so that they can use the read/write scopes.
#rb andriy.tylychko
#jira none
#preflight 6464ec286b1406b54a42b575

[CL 25507933 by Steve Robb in ue5-main branch]
2023-05-17 11:17:27 -04:00
danny couture
01eeecfefb Standardize default internal flags exclusion for all object iterators
#rnx
#rb Francis.Hurteau, PJ.Kack
#preflight 6463a91e317ee2d9d1b07976

[CL 25507084 by danny couture in ue5-main branch]
2023-05-17 10:34:01 -04:00
Steve Robb
1f5fd520a6 Fixed multicast delegate indexing in FMulticastDelegateProperty.
#rb andriy.tylychko
#jira none
#preflight 6464b78d317ee2d9d12fae3a

[CL 25504861 by Steve Robb in ue5-main branch]
2023-05-17 07:39:48 -04:00