Rendering Dependency Graph

The Rendering Dependency Graph is a graph-based scheduling system designed to perform whole-frame optimization of the render pipeline.

Windows
MacOS
Linux

As of Unreal Engine 4.23, the underlying implementation of the Rendering Dependency Graph (RDG) is still under development and lacks many of the performance benefits mentioned in this page. However, the API is stable and the renderer is in the process of being fully ported over to RDG. Also, all new rendering features are being written using RDG.

The Rendering Dependency Graph, also called RDG or Render Graph, is a graph-based scheduling system designed to perform whole-frame optimization of the render pipeline. It takes advantage of modern APIs, like DirectX 12, to improve performance through the use of automatic asynchronous-compute scheduling, as well as more efficient memory and barrier management.

DirectX 11 and OpenGL style APIs require the driver to invoke complex heuristics to determine when and how to perform critical scheduling operations on the GPU. Examples would include flushing caches, managing and reusing memory, or performing layout transitions. The immediate-mode nature of the interface requires complex bookkeeping and state-tracking to handle every edge case—ultimately, negatively impacting performance and hampering parallelism.

Modern graphics APIs, like DirectX 12, Vulkan, and Metal 2, have shifted away from this model, instead opting to shift the burden of low-level GPU management to the application itself. This presents an opportunity to improve performance and simplify the rendering stack by exploiting higher-level context of the rendering pipeline to drive scheduling.

The concept for RDG works as follows: instead of executing passes immediately on the GPU, execution is deferred until the entire frame is recorded into a dependency graph data structure. Once all passes are gathered, the graph is compiled and executed in dependency-sorted order.

The whole-frame knowledge of the dependency graph data structure paired with the power of modern graphics APIs enables RDG to perform complex scheduling tasks under the hood, completely transparent to the user:

  • Performs automatic scheduling and fencing of asynchronous-compute passes.

  • Keeps alias memory between resources active during disjoint intervals of the frame.

  • Kicks off barriers and layout transitions early to avoid pipeline stalls.

Furthermore, RDG capitalizes on the dependency-graph to provide rich validation during pass setup, improving the development process by automatically catching both functional and performance-affecting issues.

Additional Notes and Resources

  • For a crash course on using RDG with many examples, see the following Power Point slide deck: RDG 101: A Crash Course

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback