Files
zach bethel 443f6d3331 Implemented asynchronous task support for RDG execution lambdas. This will evenutally allow for RDG to avoid syncing parallel execution tasks, improving pipeling of the rendering frame.
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]
2024-09-03 11:39:06 -04:00
..