User Guide

  • 2021.2
  • 06/24/2021
  • Public Content
Contents

Analyze GPU-bound Applications with Graphics Frame Analyzer

Locate GPU bottlenecks and root-cause rendering issues to increase performance.
Graphics Frame Analyzer is the tool to use once you have determined your application to be GPU-bound and have ruled out other issues, such as CPU-side code inefficiency and synchronization, using System Analyzer and Graphics Trace Analyzer.

Frames and Streams

To profile your game using Graphics Frame Analyzer, you first need to capture a frame or a stream.
  • A
    frame
    is a capture of all GPU activity and resources involved in rendering one frame.
    Use frames when you are only interested in the rendering performance of one specific frame.
  • A
    stream
    is a consecutive set of
    frames
    , each of which contains all information that a typical frame contains, as well as Pipeline Statistics metrics.
    Use streams when you would like to analyze the behavior of a frame relative to other frames, select the slowest frame out of a scene, or troubleshoot frame time fluctuations.

Capture and Open a Frame

To capture and open a frame:
  1. Run Graphics Monitor on your system and specify an application for analysis.
  2. Select the
    Frame
    startup mode.
  3. Click
    Start
    to run your application.
    The application launches with the HUD Overlay enabled.
  4. Press
    Ctrl+Shift+C
    to capture a frame.
    You can capture as many frames as needed without restarting the application.
    If you find it hard to capture a frame at the right moment, Set up a Trigger to capture frames automatically when a custom condition is satisfied.
  5. Once you are done, open the frame using either of these options:
    • Use the
      Open File
      ribbon of the Graphics Monitor window.
    • Launch Graphics Frame Analyzer and select a frame to open.

Capture and Open a Stream

To change tool behavior related to stream capture, configure Stream Capture Options.
To capture and open a stream:
  1. Run Graphics Monitor and specify and application for analysis.
  2. Select the Stream startup mode.
  3. Click Start to run your application.
    The application launches with the HUD Overlay enabled.
  4. By default, stream capture starts immediately when the application is started.
    You can enable the
    Defer Stream Capture
    option in the Stream Capture Options to start and stop stream capture manually.
    If this option is enabled, locate a scene of interest and press L to start and stop stream capture.
  5. Once you are done, open the stream using either of these options:
    • Use the
      Open File
      ribbon of the Graphics Monitor window.
    • Launch Graphics Frame Analyzer and select a stream to open.

Perform High-Level Stream Analysis

Once you open a stream, the Graphics Frame Analyzer Multi-Frame View opens.
The
Stream Viewer
pane shows all frames that were captured into the stream, as well as multiple hardware or pipeline metrics, depending on the settings.
For more information on this view, see the Multiframe View UI Reference topic.
Each bar on the top track represents a frame, with its height representing the
GPU Elapsed Time
, or the time it took to render this frame.
The
Stream Content
pane contains the list of all frames in this stream. You can also expand each frame to see the command queue timestamps.
Use the available metrics to identify issues and select individual frames for deeper analysis.
You can trim your stream by pressing the
Trim Stream
button, for example, if the stream only contains a few frames you are interested in. Trimming a stream saves disk space and processing time.

Perform High-Level Frame Analysis

Once you have a frame to analyze, either open this frame directly or select it from a stream.
Once you open a frame, note the following elements:
  • The
    Bar Chart
    shows all draw calls within a frame. By default, the
    Y
    axis is the
    GPU Duration
    , so the higher the bar, the longer the draw call took to execute.
  • The
    Main Toolbar
    contains data about the duration of the entire frame and the current selection.
    These values are recalculated dynamically when you make any changes that save or add frame time, such as applying experiments or modifying shader code. Pay attention to this block when applying experiments or trying shader code changes in real-time, as a potential time gain will be shown there.
  • The
    Metrics
    pane shows the most likely bottleneck for the currently selected draw call and offers advice on resolving the issue:
    • Green
      items indicate no bottleneck.
    • Yellow
      items indicate a secondary bottleneck.
    • Red
      items indicate the primary bottleneck.
There are several ways to approach a problematic frame:
  • Locate and select a draw call that took the most time to execute, then use the
    Metrics
    pane to determine the bottleneck.
  • Use the Advanced Profiling Mode to automatically group draw calls by their bottleneck.

Next Steps

Depending on the nature of your performance issue and your performance goals, your next steps may vary.
There are multiple options available:
  • Focus on Optimizing Specific Domains if you suspect there is a problem with a certain graphics domain, such as shading or geometry. Experiment with available items such as shader code in real-time to see the visual impact and performance gain together right in Graphics Frame Analyzer.
  • Perform Render State Experiments to confirm your bottleneck hypotheses and see the potential performance gain. For example, if you suspect that a texture is overcomplicated, try to apply the
    2x2 Texture
    experiment to see if the performance improves significantly.
  • Explore Render Target Dependencies using the Render Target Dependency viewer to explore resources, their dependencies, and rendering flow in the form of a
    scene graph
    , a graph that visually represents interconnects between resources and 3D API operations.
  • Use the Advanced Profiling Mode to group draw calls by bottleneck and focus on resolving the underlying reason, potentially improving the time for all affected draw calls.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.