4.1 Analyzing overdraw

Overdraw occurs in graphics applications where scenes are built using multiple layers of objects that overlap, and are rendered in a back-to-front order. High levels of overdraw can cause poor performance on some devices, where pixels are unnecessarily shaded multiple times. Graphics Analyzer shows the level of overdraw in a scene, to help you diagnose rendering order issues, and find opportunities to optimize performance.

When Graphics Analyzer captures a frame with overdraw mode enabled, the fragment shader in the target application is replaced with an almost transparent white fragment shader. Each time a pixel is rendered to the framebuffer, the alpha value is increased using an additive blend. Therefore, as more overdraw happens in an area, the whiter the final image appears.

Use overdraw mode to check that opaque objects are being rendered in a front-to-back order. This order enables Arm® Mali™ GPUs to use early ZS testing to disable fragment shading for objects that are hidden by objects that are closer to the camera, or by stencil masks.

If the scene uses transparency, some level of overdraw is expected, as objects must be rendered back-to-front. Use transparency carefully in mobile applications, as the performance cost of shading multiple layers can be significant.

Procedure

  1. Connect Graphics Analyzer to the application on your device as described in Get Started with Graphics Analyzer, and start your capture.
  2. Perform your test scenario in the application on the device. To locate the right frame, just before you get to the scene you want to analyze, use the pause and step buttons.
    Figure 4-1 Pause and step buttons


  3. Click the Toggle Overdraw Mode icon to enable overdraw mode, then click the Capture icon to capture the next frame.
  4. When you have captured the data you need, click the Stop tracing icon.
    Results: The frames are listed in the Trace Outline view. Any frames where you have captured overdraw are shown with the icon.
  5. Expand a frame to see the renderpasses and draw calls within it. Step through the draw calls and evaluate the framebuffer output to see how each drawn object affects the level of overdraw in the scene. Hover over different areas of the scene to see the level of overdraw at that point.
    Figure 4-2 Levels of overdraw


  6. View the histogram to see the number of pixels being shaded at each level of overdraw in the scene.
    Figure 4-3 Number of shaded pixels


Next Steps

When you have identified an area in the scene with high overdraw, refer to the following topics to get advice on how to reduce it.

Non-Confidential - RELPDF file icon PDF version101545__00_en
Copyright © 2020–2022, 2024 Arm Limited or its affiliates. All rights reserved.