com.unity.burst 1.8.0-pre.1
Notes: processedReleased May 10, 2022
Unity Compatibility
Minimum Unity: 2020.3
Package Dependencies
📈 Improvements
- Always preserve frame pointers in Burst. This results in a neglible performance hit (less than 0.5% in benchmarks), but ensures that stack recovery for stack traces is always possible.
- Class libraries are now built with netstandard 2.0
- The minimum Xcode version to build for iOS, iPadOS, and tvOS with Burst is now 12.0.0.
- Upgraded Burst to use LLVM Version 13.0.1 by default, bringing the latest optimization improvements from the LLVM project.
- Fixed "error while hashing" message that could appear during compilation
- Made Burst explicitly check for any compilation requests that came from `AssemblyBuilder`, and do not compile these with Burst. These exist outside the normal compilation pipeline, and Burst could not support them (but we now explicitly check for that case).
- Made Burst's ILPP 22% faster by caching dependent assemblies that the being-processed assembly uses.
- Changed how we process static readonly fields in static constructors such that we'll allow more computational budget per static field. This fixes the case where having too many static readonly variables in a single static constructor could fail to compile, while they would work if each was in their own static constructors.
- Collapsed block of code in burst inspector now shows the blocks first line of code.
- Upgraded Burst to use LLVM Version 14.0.0 by default, bringing the latest optimization improvements from the LLVM project.
- Changed the default alignment for `SharedStatic`'s from 4 to 16.
✨ Features
- Branches now highlights when you hover them.
- Branches are clickable; directing the view to the other end of the branch when clicked.
- Added support for the `System.Runtime.CompilerServices.IsExternalInit` workaround documented here into Burst when used in 2022.1+.
⚡ API Changes
- Removed the requirement that `BurstLoader` has to initialize `BurstReflection` during a domain reload, making `BurstLoader` setup 2x faster during domain reloads.
🔧 Bug Fixes
- Error if install in build folder is used without ever using a regular build.
- Fixed a performance regression with `IJobParallelFor` where vectorization didn't happen for cases where it previously would have.
- Fixed a compiler miscompile if you loaded a `static readonly v128` and passed it straight to a function as an argument.
- Removed implicit dependencies to pre-compile binaries in CodeGen which would otherwise cause assembly resolution conflicts.
- Fixed a Unity 2021.2 and newer bug that manifested with UWP builds - we were using the wrong `unityaot` folder in the Unity editor distribution with Burst.
- Fixed a really subtle caching bug in the compiler where if you had a job that compiled successfully at least once, then it failed (you used managed state for instance), then you closed the editor and restarted, if the compiler threads started in precisely a strange combination then Burst might accidentally never recompile the job which failed previously.
- Fixed potential hang in Editor when compiling a Burst entry point method that is defined in a generic class
- Fix for the `X.pdb: The process cannot access the file because it is being used by another process` issue our users were seeing. We were taking a `FileShare.Read` lock, when we needed to take `FileShare.ReadWrite`.
- Fixed a bug where the compiler would reject a `try`/`finally` statement if it was the first thing in a method
- Fixed a performance regression affecting some vectorization in Burst 1.7+ (LLVM 12+).
- Inspector performance regression.
- Improved UWP linker error message to clarify which VS components need to be installed for UWP
- Fixed a bug that meant Burst was accidentally enabled in secondary Unity processes, including the asset import worker and out-of-process profiler (see changelog entry for 1.6.0-pre.1 for more context around this)
- Keybindings for copy and selection did not depend on OS.
- Right pane vertical scrollbar not always showing correctly.
- Inspector font style changing when entering and exiting play mode.
- Fixed access violation error that could occur when reading from a static readonly variable
- Made `--burst-force-sync-compilation` command-line option actually work
- Fixed a bug that was exposed by a Script Updater running against the Entities tests, whereby if some sort of pre-domain-reload code (some sort of teardown like thing) called into Burst, the script updater could have caused Burst to purge valid function pointers, resulting in us trying to execute a DLL location that we had already unloaded.
- Fixed a super rare bug whereby if you kicked off two compilations very close together (most likely when running Unity in some sort of headless build-a-player mode), Burst could throw an exception on a burst hash cache file being locked by the process.
- Fix a bug where if you had a long running compilation and a new compilation came in, some threads in the thread pool could (if unlucky) block trying to dirty the assembly in our Burst caching infrastructure while waiting for the compilation to complete.
- Fix a bug where codegen differences could occur when using a local vector variable that was being captured by reference and passed to a called function, versus when it wasn't.
- Fixed an exception that could occur if you had the Burst AOT Settings menu docked in the Editor, and then did a player build. Trying to change any of the Burst AOT Settings would throw an exception (unless you closed and reopened the Burst AOT Settings).
- Fixed a bug where we could leave background tasks around forever when we had actually completed them (could only happen if two re-compilation requests arrived close together, meaning we'd cancel the first but never report to the background tasks that we had cancelled them!).
- Fix the Burst `link.xml` output to preserve C# methods we rely on, alongside the static constructors that we preserved previously.
- Fixed errors when working with paths containing special characters
- Fixed a bug where if you used `FloatMode.Fast` with `math.pow`, where the `y` argument to `math.pow` was actually sourced from an integer, illegal codegen would be generated (LLVM would try and call out to `powf` from the cstdlib).
- Worked around an ordering issue with post-processing in 2020.3 and earlier by deferring the early compilation of script assemblies in the editor until the entire pipeline has completed.
- Fixed a bug in 2022.1+ where calling `Debug.Log` in a static constructor would result in a Burst failure.
- Fixed another rare case of the file-is-locked bug where the Burst IL Post Processor could incorrectly hold a file lock on a pdb.
- Fixed a bug when calling profiling `CreateMarker` on iOS, Burst could fail at runtime saying it was unable to find `CreateMarker__Unmanaged`.
- Fixed that the `crc32_u64` second parameter should have been a `ulong`. Added a new `ulong` variant and marked the old `long` variant as `[Obsolete]`.
- Fixed a bug where using `ReinterpretStore(someIndex, (ushort)someValue)` could cause an internal compiler error in Burst.
- Fixed a potential deadlock whereby if Burst was compiling in the background (the background tasks window showed Burst in it) and a user switched from release to debug in the editor, Burst could cause a deadlock.
- A potential issue with the debug info mover pass, that meant it only affected the first entry point in a module
- Fixed hashing error that could occur with unbound generic type
- Fixed a bug where if you had synchronous compilation on a job, disabled Burst compilation and entered playmode, then exited playmode, and finally re-enabled Burst compilation, a hang could occur.
- Fixed a bug where toggling Burst enable <-> disable during a playmode execution using Burst, and then attaching the managed debugger, could cause an editor crash.
- Fixed a memory leak where during hashing we'd pin a GC object and never unpin and free it.
- Fix burst inspector sometimes stalling during loading for script reloads.
- Fixed a super rare bug where Burst could hit an internal error with `System.InvalidOperationException: Nullable object must have a value`.
- Fixed a regression where out parameters of C# 9.0 function pointers weren't working in Burst.
- Fixed internal compiler error when encountering a `calli` with closed generics
- Fixed bug in static constructor ordering in the presence of indirect dependencies between static constructors (i.e. static constructor -> static method -> static constructor) that could result in a runtime crash
- Added workaround for "cannot dlopen until fork() handlers have completed" issue seen in macOS 12.3
- Fixed compiler crash when trying to dynamically call `BurstCompiler.CompileFunctionPointer` in Burst-compiled code
- Fix compiler crash when the only usage of a static field was in a formatted exception string
