Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ weight: 3
### FIXED, DO NOT MODIFY
layout: learningpathall
---
In 2021 Unity released version 1.5 of the Burst compiler. The headline feature of this version was new support for Neon intrinsics. Since then there have been various improvements in both Burst and Neon support. This learning path was written using Unity 2022.3 and [Burst 1.8.12](https://docs.unity3d.com/Packages/com.unity.burst@1.8/manual/index.html).
In 2021 Unity released version 1.5 of the Burst compiler. The headline feature of this version was new support for Neon intrinsics. Since then there have been various improvements in both Burst and Neon support. This learning path was written using Unity v6.3 and [Burst 1.8.28](https://docs.unity3d.com/Packages/com.unity.burst@1.8/manual/index.html).

## Unity Burst compiler
Burst is an advanced compiler that compiles specific parts of your code. It translates .NET byte code into CPU native instructions. It is part of Unity's [DOTS (Data Oriented Technology Stack](https://unity.com/dots). Your project and code need some minimal setup in order to use the Burst compiler.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In order to leverage Neon intrinsics in code, you first have to ensure that your

### Enable Burst package

1. In the Window menu, select _Package Manager_
1. In the Window menu, select _Packet Management_ -> _Package Manager_

1. Ensure that the Packages option in top left is set to _Unity Registry_

Expand All @@ -24,7 +24,7 @@ In order to leverage Neon intrinsics in code, you first have to ensure that your
1. If Burst is already installed, it will be ticked. If not, select _Install_

### Turn off ARMv7 architecture support
Neon intrinsics in Unity require ARMv8.
Neon intrinsics in Unity require ARM64.

1. Select _Project Settings_ from the _Edit_ menu

Expand All @@ -34,7 +34,7 @@ Neon intrinsics in Unity require ARMv8.

1. Ensure ARMv7 is _not_ ticked

1. Ensure ARMv8 _is_ ticked
1. Ensure ARM64 _is_ ticked

### Allow unsafe code
We need to make use of memory pointers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ First, you will need a consistent scenario in which you can reliably compare the

The sample generates new characters every frame up to a maximum of 2401. This maximum is reached in a couple of minutes or so.

Unfortunately, the sample code doesn’t display the character count but it can be added easily.
Unfortunately, the sample code in the CollisionCalculationScript doesn’t display the character count but it can be added easily.

### Display character count
First, pass the character count to the `ScreenWriteout` function call in _Update_. Line 265 becomes:
Expand Down Expand Up @@ -52,7 +52,7 @@ You will need to ensure plain (unoptimized) mode is active:
public const Mode codeMode = Mode.Plain;
```

4. Open _Build Settings_ from the _File_ menu
4. Open _Build Profiles_ from the _File_ menu

5. Ensure the following options:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To compare the results you will use the Analyzer to import all three datasets bu

1. Click back to the Analyzer and select the second _Pull Data_.

You now have two datasets loaded, one from the unoptimized mode and one from the Burst mode. This is what the data looks like collected from a Samsung S8.
You now have two datasets loaded, one from the unoptimized mode and one from the Burst mode. This is what the data looks like collected from our sample device.

![Plain vs Burst#center](images/analyzer-plain-vs-burst.PNG)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ prerequisites:
- Desktop computer capable of running Unity
- Unity version compatible with Unity Burst compiler 1.5 or later

author: Arm
author: Ben Clark, Joshua Marshall-Law

### Tags
skilllevels: Advanced
Expand Down