Here’s the graph from the previous section:
An inefficient render graph in need of optimization
At a basic level, render graphs consist of boxes and arrows:
Render graphs describe rendering performed by the GPU while it is constructing a single frame. This rendering starts and ends with resources. As a result of graphs being read from left to right:
To keep the graph as simple as possible, Frame Advisor omits read-only resources.
In an efficiently-generated frame, all workloads and generated resources contribute to the creation of the final swapchain output image shown on the right of the diagram. Notice in the graph above that the swapchain is shown in a different color.
In a suboptimally-generated frame, there may be other outputs which are not sent to the swapchain and consequently are not shown to a user. These represent unwanted data movement.
Take a closer look at what can be represented in a node on the render graph.
Most of the execution nodes in the sample graph above are colored green and labeled “RP…” These are render passes .
Figure 2. A render pass node
Render passes transform sets of input images into sets of output images using a rendering pipeline. The way this is declared varies across APIs. In OpenGL ES, a number of different API calls can indicate the boundaries of a render pass. In Vulkan, render passes are declared explicitly .
Within each execution node representing a render pass, Frame Advisor gives information such as:
When you click an execution node, such as a render pass, Frame Advisor navigates to the associated API call.
The graph also shows a transfer node, colored blue, and labeled ”Tr…”.
A transfer node
Transfer nodes represent data movement between resource locations in memory.
You may also see other types of execution node. For example, you may see compute nodes if your application uses compute shaders.
Resource nodes show inputs and outputs of the execution nodes. They are shown as small grey rectangles with rounded edges.
There are different types of resource node:
T
. RB
. The title ends with a code indicating the class of render buffer – for example, .s
for stencil and .d
for depth. The original render graph also contains a render buffer node representing a stencil.