Commit Graph

35 Commits

Author SHA1 Message Date
matt breindel
2aa030c727 CONTROL_FLOW_PERF_TRACE_STEP. Adding support in FControlFlow and TRACE_CPUPROFILE macros to allow you to begin an event in a control flow node implementation and have it automatically terminated by FControlFlow whenever/however that node completes. This ensures that in a profile trace sequential steps show up sequentially rather than appearing nested (despite the technical fact that they are actually invoked as nested functions).
[REVIEW] [at]*evgenii.babinets [at]*geoffrey.wong

[CL 26693666 by matt breindel in ue5-main branch]
2023-07-28 20:29:29 -04:00
bryan sefcik
da92084a12 Optimized out more private modules includes and dependencies.
#preflight 64627c382965f6ea8ea83bd6

[CL 25479683 by bryan sefcik in ue5-main branch]
2023-05-15 16:26:12 -04:00
daniel broder
017b813500 Added the current and complete node names to an ensure that's supposed to show the nodes are the same to help track down what's happening.
Made FControlFlowNode::GetNodeName() public so that it can be used to give more info for debugging.


#RB Devlin.Willis, Geoffrey.Wong


#UE5

[CL 25291703 by daniel broder in ue5-main branch]
2023-05-01 17:06:51 -04:00
geoffrey wong
b2fa243d11 CIS fix
[CL 25287103 by geoffrey wong in ue5-main branch]
2023-05-01 13:46:40 -04:00
geoffrey wong
f0772d3e40 Added function: "QueueDelay"
[CL 25285673 by geoffrey wong in ue5-main branch]
2023-05-01 12:56:14 -04:00
daniel broder
c78c8721d2 Split ``ensure(CurrentNode.IsValid() && &NodeCompleted.Get() == CurrentNode.Get())` --> `ensure(CurrentNode.IsValid()) && ensure(&NodeCompleted.Get() == CurrentNode.Get())``. These are logically equivalent, but more information is given by having separate ensures if one of them fires (and they are still guaranteed not to fire both).
[FYI] Geoffrey.Wong

#RB Devlin.Willis


#UE5

[CL 25129909 by daniel broder in ue5-main branch]
2023-04-20 12:37:46 -04:00
geoffrey wong
ebc09abb39 Updated ensure with messaging
[CL 24802284 by geoffrey wong in ue5-main branch]
2023-03-27 10:05:00 -04:00
geoffrey wong
0a53cd09e3 Corrected Comments
[CL 24563860 by geoffrey wong in ue5-main branch]
2023-03-08 13:50:45 -05:00
marti majo
0c6a660ac9 Control Flows
Fixing bug where last node would not fire OnStepCompletedDelegate() delegate.

[REVIEW] [at]geoffrey.Wong

[CL 24485000 by marti majo in ue5-main branch]
2023-03-02 12:45:16 -05:00
geoffrey wong
d446ffeac2 Deleted Register OnFlowCancel functions since there is a public MulticastDelegate to bind to
[CL 24371858 by geoffrey wong in ue5-main branch]
2023-02-22 17:56:31 -05:00
geoffrey wong
f831be2aed Reorganized headers
[CL 24343553 by geoffrey wong in ue5-main branch]
2023-02-21 13:09:33 -05:00
jamie dale
5f776d1eb4 Allow querying a flow node to see if it's been canceled
#jira
#preflight 63f3cd216928c1ca3dfb26d1
#rb Geoffrey.Wong
#rnx

[CL 24328334 by jamie dale in ue5-main branch]
2023-02-20 17:28:30 -05:00
geoffrey wong
c71a5e7e82 Moved ensureAlways because when a flow is cancelled, it goes through each node in the queue and cancels, and the branch might not have selected a branch, causing this ensure to fire all the time...which is annoying
[CL 24219077 by geoffrey wong in ue5-main branch]
2023-02-14 15:01:44 -05:00
devlin willis
e4f6f57fcb [ControlFlows] Add an externally accessible OnCancelled delegate in 23.40
[REVIEW] [at]geoffrey.wong, [at]joel.anderson, [at]daniel.broder, [at]spencer.melnick, [at]nicholas.dean
#rnx

[CL 24020260 by devlin willis in ue5-main branch]
2023-02-04 16:54:46 -05:00
bob tellez
f8bfd067be #ControlFlows Add info to an ensure
[CL 23964879 by bob tellez in ue5-main branch]
2023-02-02 02:00:49 -05:00
marti majo
50a9f78ba5 Fusing delegates for api simplification
[REVIEW] [at]fn-pj-eng

[CL 23960965 by marti majo in ue5-main branch]
2023-02-01 19:24:40 -05:00
geoffrey wong
feec46b750 Expanded ControlFlows with Loop Syntax:
FlowInstance
	.Loop([this](TSharedRef<FConditionalLoop> LoopHandle)
	{
		LoopHandle->RunLoopFirst()                       // See FConditionalLoop inside ControlFlowConditionalLoop.h for additional options
			.QueueStep(this, &ThisClass::Foo)
			.QueueStep(this, &ThisClass::Foo);

		return FMath::RandBool() ? ELoopConditions::RunLoop : ELoopConditions::LoopFinished;
	});

[CL 23924018 by geoffrey wong in ue5-main branch]
2023-01-31 01:27:23 -05:00
marti majo
114c4f4ed8 Control Flow Changes expansion with public multicast delegates
[CL 23799097 by marti majo in ue5-main branch]
2023-01-20 18:31:15 -05:00
geoffrey wong
879e54cbf8 Rename in preparation to deprecate previous Control Flow Loop implementation
[CL 23748055 by geoffrey wong in ue5-main branch]
2023-01-17 18:40:35 -05:00
henrik karlsson
3c9aacb1ad [Engine/Plugins]
* Updated public headers for ~170 engine plugins using iwyu to remove includes not needed. Removed includes are still available behind UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2

#preflight 63c08f4a2a6acaf1622bcc73
#rb none

[CL 23674775 by henrik karlsson in ue5-main branch]
2023-01-13 01:54:01 -05:00
henrik karlsson
2f78497e67 [Engine/Plugins]
* Updated private files with IWYU for all plugins which had 3 or less changes made in ue5 main since last integration to fn

#preflight 63bf8d8b577437afe607dc72
#rb none

[CL 23659643 by henrik karlsson in ue5-main branch]
2023-01-12 01:48:34 -05:00
henrik karlsson
ce587eb612 Added markups for headers that can't be compiled standalone.. this is needed for both Header units and IWYU
#preflight 63789b0c170bc34a93a869e5
#rb none

[CL 23552160 by henrik karlsson in ue5-main branch]
2022-12-21 02:46:50 -05:00
yuriy odonnell
654fdaa138 Fix a crash due to global/static destruction order
#rb Geoffrey.Wong
#preflight skip

[CL 23259012 by yuriy odonnell in ue5-main branch]
2022-11-24 09:53:54 -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
bryan sefcik
0eeac455e0 Pass 3 on cleaning up build.cs files.
#jira
#preflight 631b9c15d31788ea3ab0f27b

[CL 21935601 by bryan sefcik in ue5-main branch]
2022-09-10 00:02:58 -04:00