DEV Community

Cover image for How Can Unity Developers Identify the Causes of GPU Pressure on Mobile Devices?
GameOptim
GameOptim

Posted on

How Can Unity Developers Identify the Causes of GPU Pressure on Mobile Devices?

Summary

As mobile games continue to pursue higher visual quality, GPU optimization has become increasingly important. Differences between mobile GPU architectures can make GPU bottlenecks difficult to identify and optimize.

GameOptim GOT Online GPU Mode provides a set of tools for analyzing GPU pressure from multiple perspectives, including GPU rendering, bandwidth, rendering resources, Overdraw, and device temperature. These metrics help Unity developers move from identifying GPU pressure to locating the specific rendering workload behind it.

This article introduces the key GPU analysis features and explains how developers can use them to investigate common GPU performance issues.

Introduction

Higher-quality visuals often mean more complex rendering workloads. More geometry, textures, shader calculations, transparency, and post-processing can all increase GPU pressure on mobile devices.

At the same time, different GPU vendors and architectures expose different performance metrics, making it difficult to rely on a single indicator when investigating GPU bottlenecks.

GameOptim GOT Online GPU Mode provides several analysis modules designed to break GPU pressure down into more actionable data.

The main capabilities include:

  • Performance Brief: Quickly identify areas of high GPU pressure and prioritize optimization tasks.
  • GPU Analysis: Analyze GPU pressure from rendering and bandwidth perspectives.
  • Rendering Resource Analysis: Investigate how textures and meshes are loaded and used.
  • Overdraw Snapshot: Locate the sources of high Overdraw more easily.
  • GPU Temperature: Determine whether GPU workload is a major contributor to device heating.

How Can Developers Quickly Identify GPU Pressure?

The Performance Brief provides a high-level overview of GPU performance during testing.

GameOptim displays FPS and GPU Clocks and highlights GPU Bound frames with a light red background.

GPU Bound indicates a high GPU workload, where the number of GPU clock cycles required for computation is high enough that the GPU may not be able to sustain the target frame rate.

The Performance Brief also summarizes metrics from four areas:

  • GPU performance
  • Rendering statistics
  • Texture resource analysis
  • Mesh resource analysis

It also provides corresponding optimization tasks.

The purpose of the brief is not to replace detailed analysis, but to help developers quickly filter a large number of performance metrics and identify high-priority optimization tasks.

When a metric requires deeper investigation, developers can move into the corresponding analysis module.

How Can GPU Rendering Metrics Reveal the Source of GPU Pressure?

The GPU Analysis module examines GPU pressure from two perspectives: rendering and bandwidth.

The available metrics may differ between GPU vendors because GameOptim collects different parameters from different GPU architectures.

How Can GPU Clocks Be Used to Identify Rendering Pressure?

GPU Clocks is one of the primary metrics for evaluating GPU performance.

By examining the GPU Clocks curve, developers can quickly identify scenes where GPU pressure is high.

GameOptim also provides average values and performance trends for:

  • GPU Shaded
  • GPU Shader Cycles
  • GPU Primitive

When GPU Clocks is high in a particular scene, these metrics can help developers determine which part of the rendering workload is contributing to the GPU pressure and identify potential optimization directions.

What Is the Difference Between Shader Instructions and Shader Cycles?

Starting with GameOptim SDK 2.4.9, the Mali GPU report includes GPU Shader Instructions, which represents the number of shader instructions executed by the GPU per frame.

GPU Shader Instructions and Shader Cycles describe different aspects of shader execution.

  • Shader Cycles: The processing cycles required when the shader actually runs on the GPU.
  • Shader Instructions: The instruction operations contained in the shader.

The number of processing cycles required for the same instructions can differ between GPUs with different performance characteristics.

Therefore, Shader Instructions can help developers understand the complexity of the shader itself, while Shader Cycles provide information about the actual processing workload on the GPU.

How Can Culled Primitives Be Broken Down Further?

GameOptim SDK 2.4.9 also provides a more detailed breakdown of Culled Primitives under GPU Primitive.

Three additional metrics are available:

  • FacingCullingPrimitives: Number of primitives removed through facing culling.
  • FrustumCullingPrimitives: Number of primitives removed through frustum culling.
  • CoverageCullingPrimitives: Number of small primitives removed through coverage culling.

These metrics help developers understand the composition of Culled Primitives and identify rendering resources that may be causing unnecessary GPU workload in specific scenes.

How Can Developers Analyze GPU Bandwidth Pressure?

High GPU read and write bandwidth can contribute to significant heat generation and power consumption, making bandwidth an important area to investigate.

Starting with GameOptim SDK 2.4.9, Read Total is further divided into more detailed metrics.

For Mali GPUs, the report includes:

  • Front-end Read
  • LoadStore Read
  • Texture Read

These correspond to bandwidth used by the GPU's Tile Unit, Load/Store Unit, and Texture Unit, including reads of TileList data, vertex input attributes, Uniform data, color/depth data, and texture data.

For Adreno GPUs, Read Total is divided into:

  • Vertex Read
  • SP Read
  • Texture Read

These metrics similarly cover reads of TileList data, vertex input attributes, Uniform data, color/depth data, and texture data.

Why Does Cache Hit Rate Affect GPU Read Bandwidth?

For different GPU architectures, Read Total depends on the amount of data processed by the relevant GPU units per second as well as the hit rates of the L1 and L2 caches.

When the total amount of data remains unchanged, a higher cache hit rate results in a lower Read Total because more data can be served from the cache instead of being read from farther memory.

GameOptim also provides related metrics such as:

  • GPU Texture Filter
  • GPU Stall
  • GPU Texture Cache Miss
  • GPU Primitive

These metrics can help developers further investigate the source of GPU bandwidth pressure.

How Can Developers Check Whether Textures and Meshes Are Being Used Efficiently?

The more textures and meshes participate in rendering, and the more frequently they are sampled, the more likely memory usage, GPU bandwidth, and GPU Clocks are to increase.

To understand whether rendering resources are actually being used efficiently, developers can enable texture and mesh resource analysis and inspect their specific usage.

How Can Texture Resource Analysis Identify Unused Textures?

The texture resource analysis page provides information such as:

  • Texture memory usage
  • Texture count
  • Texture dimensions
  • Texture rendering utilization
  • Mipmap status
  • Mipmap sampling rate

Texture rendering utilization can help identify textures that remain loaded in memory but never participate in rendering.

Developers can then investigate whether the unused resources are related to:

  • Invisible rendering objects
  • Inefficient asset packaging
  • Unnecessary loading strategies
  • Other resource management issues

Can Mipmap Sampling Reveal Oversized Textures?

Yes. A low Mipmap Level 0 sampling rate can indicate that a texture is larger than necessary for its actual usage.

GameOptim uses a 5% Level 0 sampling rate as a reference point. If a texture's Level 0 sampling rate is below 5%, developers can investigate whether its resolution is unnecessarily high.

Reducing the texture resolution can lower memory pressure without necessarily affecting the rendered result when the higher-resolution Mipmap level is rarely used.

How Can Mesh Resource Analysis Identify Overly Detailed Geometry?

The mesh resource analysis page provides rendering utilization as well as minimum rendering density.

Meshes with 0% rendering utilization can be investigated in a similar way to unused textures.

Minimum rendering density provides another way to determine whether a mesh contains excessive geometric detail.

Rendering density represents the number of mesh vertices within an average area of 10,000 pixels.

If the value is above 1,000, the mesh may contain excessive geometric detail for the relatively small screen area it occupies.

If the minimum rendering density remains above 1,000, developers can consider:

  • Reducing the mesh polygon count
  • Applying LOD
  • Reviewing whether the asset needs to be rendered at its current level of detail

How Can an Overdraw Snapshot Help Locate GPU Pressure?

Overdraw represents the number of times the screen is filled during a frame.

Transparent objects can cause the same pixel to be rendered multiple times, making them an important source of high Overdraw and potentially increasing GPU workload and device temperature.

In the Overdraw Snapshot module, GameOptim calculates overall Overdraw using Fragment Shaded and a fixed resolution of 1920 × 1080.

During a GPU Mode test, developers can manually dump a specific scene to capture its detailed Overdraw information.

The Overdraw Snapshot module then displays Overdraw information for each camera in the captured frame.

The Overlay-UI (UWA) camera represents the Overdraw generated by the Overlay portion of UGUI, including UI elements that are not attached to any camera.

The module also provides an Overdraw heatmap below the chart.

Brighter areas indicate pixels that were filled more times during the current frame, meaning higher Overdraw and potentially greater GPU pressure.

By comparing the scene screenshot with the Overdraw heatmap, developers can more easily identify which visual elements are responsible for high Overdraw.

How Can Developers Determine Whether GPU Pressure Is Causing Device Heating?

High GPU workload can contribute to increased device temperature.

GameOptim records GPU, CPU, and battery temperatures, allowing developers to determine whether GPU workload is a major contributor to device heating.

If GPU pressure is confirmed as a major factor, developers can further investigate related metrics such as:

  • FPS
  • GPU Clocks
  • GPU Bandwidth

Power consumption is also closely related to GPU temperature and can provide another useful signal when investigating energy consumption and thermal issues.

However, GPU temperature should not be analyzed in isolation.

Because the CPU and GPU are physically close on mobile devices, high CPU workload and the resulting heat can also contribute to higher GPU temperature.

Therefore, when investigating GPU-related thermal problems, developers should also consider:

  • GPU performance pressure
  • GPU bandwidth
  • CPU main-thread workload
  • CPU worker-thread workload

A broader view can help distinguish between GPU-driven and CPU-driven thermal issues.

What Should Unity Developers Take Away?

  • Use GPU Clocks to identify scenes with high GPU pressure, then drill down into more specific rendering metrics.
  • Use Shader Instructions and Shader Cycles together to understand shader complexity and actual GPU processing workload.
  • Break down Culled Primitives to identify where GPU-side culling is occurring.
  • Analyze GPU bandwidth from the relevant GPU-unit metrics and consider cache behavior.
  • Check texture and mesh utilization to identify resources that are loaded but rarely or never rendered.
  • Use Mipmap sampling rates and mesh rendering density to identify resources with potentially excessive resolution or geometric complexity.
  • Use Overdraw snapshots and heatmaps to locate transparent objects and other sources of excessive pixel processing.
  • When investigating device heating, analyze GPU, CPU, bandwidth, power, and temperature together rather than treating GPU temperature as an isolated metric.

FAQ

Q1. What does GPU Clocks indicate?

GPU Clocks is a primary metric for evaluating GPU performance. A high GPU Clocks value can indicate that the GPU is under significant processing pressure in a particular scene.

Q2. What is the difference between Shader Instructions and Shader Cycles?

Shader Instructions represents the shader instruction operations, while Shader Cycles represents the processing cycles required when the shader executes on the GPU. The same instructions may require different numbers of processing cycles on GPUs with different performance characteristics.

Q3. Why should developers check Culled Primitives?

Breaking down Culled Primitives into Facing Culling, Frustum Culling, and Coverage Culling helps developers understand why primitives are being removed and identify potential sources of unnecessary GPU workload.

Q4. How can developers find unused textures and meshes?

Rendering utilization can reveal resources that remain loaded but do not participate in rendering during the test. Developers can then investigate whether the resources are unnecessary, incorrectly packaged, or simply not covered by the test scenario.

Q5. What does a low Mipmap Level 0 sampling rate indicate?

A low Level 0 sampling rate may indicate that the texture resolution is higher than required for its actual rendering usage. GameOptim uses 5% as a reference point for identifying textures that may warrant further investigation.

Q6. How can Overdraw Snapshots help with GPU optimization?

The Overdraw Snapshot module provides per-camera Overdraw information and a heatmap. Brighter areas indicate more pixel fills, allowing developers to compare the heatmap with the scene and locate visual elements responsible for high Overdraw.

Q7. Is high GPU temperature always caused by GPU workload?

Not necessarily. High CPU workload can also contribute to device heating, and the CPU and GPU are physically close on mobile devices. GPU temperature should therefore be analyzed together with GPU pressure, bandwidth, CPU workload, power consumption, and other relevant metrics.

Top comments (0)