You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
The behavior is opt-in by adding a FRDGAsyncTask member to the lambda args like so:
[...] (FRDGAsyncTask, FRHICommandList& RHICmdList) {}
This API design choice is for two reasons.
1. Visually localize the tag near the lambda capture args. Capture arg lifetime must be valid for async access; e.g. by value or referencing memory that is tied to RDG lifetime or the scene renderer lifetime (async tasks are synced by the scene renderer just like mesh pass tasks are). This responsibility is up to the user, so it should be obvious at first glance when a pass can run on an async task.
2. Enforce a compile-time trait on the lambda without requiring multiple AddPass function variants. This allows for utility functions to continue to work as is.
#rb Luke.Thatcher
[CL 35969245 by zach bethel in ue5-main branch]