Skip to content

Commit 6e28bf1

Browse files
Merge pull request #1733 from Mark9943/render_graph_optimization6
Add learning path for optimization using the render graph
2 parents 602a021 + 3809461 commit 6e28bf1

20 files changed

+658
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ z_local_saved/
2121
*.iml
2222
*.xml
2323

24+
# CTags symbol index
25+
tags
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: Optimizing graphics using Frame Advisor’s render graphs
3+
4+
minutes_to_complete: 30
5+
6+
who_is_this_for: Application developers who wish to improve graphics performance.
7+
8+
learning_objectives:
9+
- Understand Frame Advisor's Render Graph view
10+
- Use the Render Graph view to identify and resolve performance issues in your application
11+
12+
prerequisites:
13+
- An installed copy of Frame Advisor, part of Arm Performance Studio. [You can download Arm Performance Studio for free.](https://developer.arm.com/Tools%20and%20Software/Arm%20Performance%20Studio#Downloads)
14+
- A supported Android device, if you wish to analyze your own applications.
15+
- Some basic familiarity with Frame Advisor. To get started, read [“Frame Advisor”](../ams/fa) in _Get started with Arm Performance Studio for Mobile_.
16+
17+
author: Mark Thurman
18+
19+
further_reading:
20+
- resource:
21+
title: Frame Advisor user guide
22+
link: https://developer.arm.com/documentation/102693/latest/
23+
type: documentation
24+
- resource:
25+
title: Arm Performance Studio (main site)
26+
link: https://developer.arm.com/Tools%20and%20Software/Arm%20Performance%20Studio%20for%20Mobile
27+
type: website
28+
- resource:
29+
title: Learning path – Get started with Arm Performance Studio for mobile
30+
link: https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/ams/fa
31+
type: website
32+
- resource:
33+
title: Learning path – Analyze a frame with Frame Advisor
34+
link: https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/analyze_a_frame_with_frame_advisor
35+
type: website
36+
- resource:
37+
title: Video tutorial – Capture and analyze a problem frame with Frame Advisor
38+
link: https://developer.arm.com/Additional%20Resources/Video%20Tutorials/Capture%20and%20analyze%20a%20problem%20frame%20with%20Frame%20Advisor
39+
type: website
40+
41+
### Tags
42+
skilllevels: Introductory
43+
subjects: Performance and Architecture
44+
armips:
45+
- Mali
46+
- Immortalis
47+
tools_software_languages:
48+
- OpenGL ES
49+
- Vulkan
50+
operatingsystems:
51+
- Linux
52+
- Windows
53+
- macOS
54+
- Android
55+
56+
57+
### FIXED, DO NOT MODIFY
58+
# ================================================================================
59+
weight: 1 # _index.md always has weight of 1 to order correctly
60+
layout: "learningpathall" # All files under learning paths have this same wrapper
61+
learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content.
62+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# ================================================================================
3+
# FIXED, DO NOT MODIFY THIS FILE
4+
# ================================================================================
5+
weight: 21 # set to always be larger than the content in this path, and one more than 'review'
6+
title: "Next Steps" # Always the same
7+
layout: "learningpathall" # All files under learning paths have this same wrapper
8+
---
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
review:
3+
- questions:
4+
question: >
5+
Suppose you are developing a game. You notice that the frame rate dips when the player performs certain actions. You suspect the cause is that the GPU has been given more complex geometry than it is able to render in the time budget for each frame. Can you use Frame Advisor's render graphs to find places where you can simplify your geometry?
6+
answers:
7+
- Yes, you can use render graphs to identify this issue
8+
- No, you can't use render graphs to identify this issue
9+
correct_answer: 2
10+
explanation: >
11+
Render graphs summarize and group information about the order of drawing operations. This summary excludes most details of the data being processed (an exception is the resolution of processed images). The Mesh view and Detailed Metrics view are better choices if you wish to identify places where your application is processing too much geometry data.
12+
13+
- questions:
14+
question: >
15+
“Render graphs show all resources used while rendering a frame.” Is this statement correct?
16+
answers:
17+
- Yes, the statement is correct
18+
- No, the statement is incorrect
19+
correct_answer: 2
20+
explanation: >
21+
Render graphs show many resources (as resource nodes). However, they do not show all resources. For example, they do not show read-only resources such as read-only textures.
22+
23+
- questions:
24+
question: >
25+
“Render graphs can only be generated on Arm hardware.” Is this statement correct?
26+
answers:
27+
- Yes, the statement is correct
28+
- No, the statement is incorrect
29+
correct_answer: 2
30+
explanation: >
31+
Render graphs will be generated for any data which can be captured in Frame Advisor. They are not specific to Arm hardware.
32+
33+
- questions:
34+
question: >
35+
“Render graphs can be used to navigate through your API calls.” Is this statement correct?
36+
answers:
37+
- Yes, the statement is correct
38+
- No, the statement is incorrect
39+
correct_answer: 1
40+
explanation: >
41+
Frame Advisor's Render Graph view can be used as a clickable “map” of the data processed by the GPU while generating a frame. Clicking an execution node will take you to the API call relating to that node.
42+
43+
44+
45+
# ================================================================================
46+
# FIXED, DO NOT MODIFY
47+
# ================================================================================
48+
title: "Review" # Always the same title
49+
weight: 20 # Set to always be larger than the content in this path
50+
layout: "learningpathall" # All files under learning paths have this same wrapper
51+
---
122 KB
Loading
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Generating a render graph for your application
3+
weight: 3
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Finding GPU-heavy parts of your application
10+
11+
Your first step is to identify which parts of your application are limited by GPU performance.
12+
13+
[Arm Streamline](https://developer.arm.com/Tools%20and%20Software/Streamline%20Performance%20Analyzer) is a good place to start. This is included as another part of Arm Performance Studio.
14+
15+
### Setting up Streamline
16+
17+
Before starting a capture in Streamline, you'll need to ask it to gather GPU data. This is done in the Configure Capture section of the Start view.
18+
19+
If you have an Arm GPU, basic configuration is simple:
20+
- Deselect the “Use advanced mode” checkbox.
21+
- Select the “Capture Arm GPU” checkbox.
22+
23+
If you have some other GPU, or want more control over the data collected, you'll need to select GPU counters manually:
24+
- Select the “Use advanced mode” checkbox.
25+
- Click the “Select counters” button to open the Counters window.
26+
- Inside the Counters window, select the counters you wish to analyze. (The Arm website has [details of counters available on Arm GPUs](https://developer.arm.com/documentation#numberOfResults=48&q=Performance%20Counters&sort=relevancy&f:@navigationhierarchiesproducts=[IP%20Products,Graphics%20and%20Multimedia%20Processors,Mali%20GPUs]).)
27+
- Close the Counters window.
28+
29+
For more details, refer to the [“Get Started with Streamline” tutorial](https://developer.arm.com/documentation/102477/0900/Overview), or [“Starting a capture”](https://developer.arm.com/documentation/101816/0905/Capture-a-Streamline-profile/Starting-a-capture) in the Arm Streamline user guide.
30+
31+
### Capturing GPU data in Streamline
32+
33+
Once you have chosen GPU counters, click the “Start capture” button to begin your capture.
34+
35+
Streamline will produce a graph showing the most GPU-heavy parts of your application (see [“Timeline overview”](https://developer.arm.com/documentation/101816/0905/Analyze-your-capture/Timeline-overview?lang=en) in the Arm Streamline user guide).
36+
37+
## Capturing a render graph
38+
39+
Now that you have identified areas of your application that you want to optimize, you can turn from Streamline to Frame Advisor.
40+
41+
To ask Frame Advisor to capture data relating to the problem areas you have seen:
42+
43+
- Click “Capture new trace” in Frame Advisor's launch screen
44+
- Connect to your application
45+
- In the Capture screen, select the number of frames you wish to capture
46+
- When you've reached the GPU-heavy part of the application run, click “Capture”, then “Analyze” to advance to the Analysis screen
47+
48+
For more details, refer to [the “Frame Advisor” section](../../ams/fa) of “Get started with Arm Performance Studio for mobile”.
49+
50+
## Viewing the render graph
51+
52+
Observe that part of the Frame Advisor window is labelled “Render Graph”. This contains the render graph relating to the frames you asked Frame Advisor to analyze.
53+
54+
For the purpose of this Learning Path, we will assume that you've captured the following render graph:
55+
56+
![An inefficient render graph in need of optimization#center](inefficient-render-graph.svg "Figure 2. An inefficient render graph in need of optimization")
57+
58+
In the next section, we will use this graph to illustrate some common application faults.

0 commit comments

Comments
 (0)