Commit Graph

6 Commits

Author SHA1 Message Date
Stephen Holmes
aa2c2ec587 Addressing numeric conversion warnings in visual logger plus minor code tidy up.
#jira UE-166285
#review-23286462
#preflight 638608baf213a116eb1ef6f0

[CL 23305014 by Stephen Holmes in ue5-main branch]
2022-11-29 09:25:35 -05:00
bryan sefcik
0beee50b45 Updated ../Engine/Source/Developer/... to inline gen.cpp files
Before:
Total CPU Time: 53783.640625 s
Total time in Parallel executor: 558.66 seconds
After:
Total CPU Time: 47886.140625 s
Total time in Parallel executor: 498.81 seconds

#jira

[CL 22173145 by bryan sefcik in ue5-main branch]
2022-09-24 13:31:25 -04:00
fred kimberley
7fbfaf57c8 Require explicit constructors/casts when converting between FVector, FVector3d, and FVector3f.
#jira UE-122078
#rb Andrew.Davidson, Colin.McGinley
#preflight standard build

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 18817999 in //UE5/Release-5.0/... via CL 18818012 via CL 18822871
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824721 by fred kimberley in ue5-main branch]
2022-02-02 07:59:31 -05:00
Yoan StAmant
be5f6a5afd [DebugDrawDelegateHelper] rollback of delegate unregistration issue previous fix and implemented a different approach for cases where proxy is not created:
In some code paths for loaded actors the call order might be different since primitive registration gets deferred (i.e. FRegisterComponentContext != nullptr).

Case 1 (normal flow): FRegisterComponentContext == nullptr
 > UPrimitiveComponent::CreateRenderState_Concurrent : calls CreateSceneProxy
 > RegisterDebugDrawDelegate
 > UnregisterDebugDrawDelegate  ==> works fine

Case 2 (deferred AddPrimitive): FRegisterComponentContext != nullptr
 > UPrimitiveComponent::CreateRenderState_Concurrent : defers CreateSceneProxy
 > RegisterDebugDrawDelegate (skip register since not init)
 > CreateSceneProxy
 > UnregisterDebugDrawDelegate  ==>  ensures in UnregisterDebugDrawDelegate

With this new version `CreateRenderState_Concurrent` calls `RequestRegisterDebugDrawDelegate` that will take care of registering the delegate immediately or mark it for deferred execution. An explicit call to `ProcessDeferredRegister` is then required from `CreateSceneProxy` to implement proper flow:

Case 2 (fixed) (deferred AddPrimitive + deferred Register): FRegisterComponentContext != nullptr
 > UPrimitiveComponent::CreateRenderState_Concurrent: defers CreateSceneProxy
 > RequestRegisterDebugDrawDelegate: defers RegisterDebugDrawDelegate
 > CreateSceneProxy: calls ProcessDeferredRegister & RegisterDebugDrawDelegate
 > UnregisterDebugDrawDelegate  ==> works fine

Bonus:
- New DebugDrawComponent abstract class that is now used to share common functionalities between existing debug related components. Takes care of DelegateHelper registration flow to render text on screen from different sources.
- FDebugDrawDelegateHelper::InitDelegateHelper is no longer virtual and derived classes requiring extra data from their associated scene proxy should set it up from their overriden CreateSceneProxy
- FDebugDrawDelegateHelper derived classes should not override RegisterDebugDrawDelegate/UnregisterDebugDrawDelegate to use their `DrawDebugLabels` method since this is already a virtual method that would get called from the base class.
- Fixed a few ViewFlag members in the SceneProxy so the DelegateHelper base class can behave as expected

#jira FORT-419154
#rb mieszko.zielinski
#robomerge FnMain
#preflight 61703f8766ed7f0001c0faf1

[CL 17875336 by Yoan StAmant in ue5-main branch]
2021-10-20 13:20:46 -04:00
Yoan StAmant
166f970337 [DebugDrawDelegate]
Update registration flow since CreateRenderState_Concurrent can't be used to register our delegate since it needs to be initialized first (CreateSceneProxy) and in some code paths for loaded actors the call order might be different since primitive registration gets deferred (i.e. FRegisterComponentContext != nullptr).
In that case initialization won't called and an ensure will fire in UnregisterDebugDrawDelegate since registration failed (was not initialized).
Case 1: FRegisterComponentContext == nullptr  ==> Super::CreateRenderState_Concurrent + sync CreateSceneProxy (init) + RegisterDebugDrawDelegate ==> works fine
Case 2: FRegisterComponentContext != nullptr  ==> Super::CreateRenderState_Concurrent + deferred CreateSceneProxy + RegisterDebugDrawDelegate (skipped since not init) + CreateSceneProxy ==> ensures in UnregisterDebugDrawDelegate

Bonus:
- some code analysis fixes
- removed some 'CoreMinimal.h' includes
- exported log category 'LogVisual'
- fixed some uninitialized properties (FNavTestDebugDrawDelegateHelper, UNavMeshRenderingComponent, FNavMeshSceneProxyData)
- fixed some methods hiding non-virtual from base class (GetAllocatedSize)
- fixed FGameplayDebuggerCompositeSceneProxy::GetMemoryFootprint that was not considering base class allocations

#rnx
#jira UE-125097
#preflight 614362684778fa00016a8cad
#rb mieszko.zielinski

[CL 17544171 by Yoan StAmant in ue5-main branch]
2021-09-16 16:47:25 -04:00
Keith Yerex
1dc8bd364b visual logger rewind debugger integration
#rb Jurre.DeBaare
#preflight 6112a4ddafd67e0001ebb06c

[CL 17124037 by Keith Yerex in ue5-main branch]
2021-08-10 16:46:48 -04:00