com.unity.burst 1.7.0
Notes: processedReleased March 2, 2022
Unity Compatibility
Minimum Unity: 2019.4
Package Dependencies
📈 Improvements
- Improved the compiler performance when doing large struct copies by detecting more cases where a load/store can be safely converted to a move-memory operation.
- Used `BuildReport::summary::subtarget` to detect headless (server) player builds on 2022.1+.
- Don't move pdbs out of build folder for UWP builds.
- Changed how we display the timings when a user has the **Show Timings** option enabled in the Burst menu, by cleaning up and presenting the information in a (hopefully!) clearer way.
- Burst now produces at most 100 jobs per DLL it creates, meaning that big assemblies will still benefit from multithreading while retaining the benefits of Burst 1.7 (significantly less DLLs, and batching of frontend and optimizer costs).
- Fixed "error while hashing" message that could appear during compilation
🔧 Bug Fixes
- Fixed constant folding when using `Hint.Likely` or `Hint.Unlikely` intrinsics - the compiler is now able to fold these calls away entirely if the input value is constant.
- Fixed an internal compiler error when casting a void\* to a pointer-to-vector and then access the element.
- One Definition Rule optimisation would break if multiple modules shared static constructors due to an issue with sharing code but not data.
- Fixed type initialization error, and invalid log messages about needing to add `[MonoPInvokeCallback]` to be compatible with IL2CPP, that could occur in a player build with Burst disabled
- ILPP issue for dots runtime whereby a calli patch could generate bad IL if the first instruction replaced was the target of a branch.
- Fixed a bug where `fixed` used in conjunction with `Span` or `ReadOnlySpan` would cause a compiler error.
- Fixed a codegen issue with Unity 2021.2 and `System.Buffer.MemoryCopy`.
- Fixed compiler crash when trying to load a generic static field
- Fixed "UnityException: CompileAsyncDelegateMethod can only be called from the main thread." error that was logged in standalone players when the first invocation of a direct-call method was from a background thread
- Fix the very rare bug whereby the Burst Hash Cache files (\*.bhc) will sometimes cause an exception in the editor log.
- Fixed the documentation to note that the `System.Runtime.CompilerServices` attributes `[CallerLineNumber]`, `[CallerMemberName]`, and `[CallerFilePath]` work with Burst, with the restriction that you cannot format the `[CallerMemberName]`, and `[CallerFilePath]` strings yet.
- Fixed an issue where with optimizations disabled, using half conversions on platforms that did not natively support half could cause linker errors.
- Fix error when trying to Direct Call a method belonging to a private nested type
- Fixed some memory leaks between the C# and C++ parts of the Burst compiler, and added some CI tooling to ensure this doesn't happen again.
- Fixed a bug where our `[BurstCompile]` job finding code would not find methods in generic base classes in places where we knew the concrete-generic type (for instance `struct Foo { [BurstCompile] struct MyJob : IJob { void Execute() {} } }`, `struct Bar : Foo {}`, and `struct Haz : Bar {}` - we wouldn't find the concrete `Foo::MyJob` in Burst).
- Fixed editor crash when trying to debug a DirectCalled method
- Fixed a bug whereby complicated `try`/`finally` nesting could trip up the compiler.
- Fixed a bug in the fixed string processing whereby we'd miscompile a fixed string that was within a struct inside a `SharedStatic` (depending on how it was used).
- Fixed a bug in the entry-point finding code whereby we wouldn't correctly resolve a nested generic struct's job if it was within a concrete generic class that was outwith the root assembly set.
- 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.
- 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
- Fixed a bug where the compiler would reject a `try`/`finally` statement if it was the first thing in a method
- 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`.
- Improved UWP linker error message to clarify which VS components need to be installed for UWP
- Fixed a performance regression affecting some vectorization in Burst 1.7+ (LLVM 12+).
- 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)
- Performance regression
- Keybindings for copy and selection did not depend on OS. Now has proper "select all" and "copy" shortcuts for MacOS.
- Fixed access violation error that could occur when reading from a static readonly variable
- Fixed a bug that could prevent Visual Studio locating .pdb files while debugging
- 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 a bug in 2022.1+ where calling `Debug.Log` in a static constructor would result in a Burst failure.
✨ Features
- Ability to partially select and copy text in the burst inspector.
- Right clicking the inspector view reveals a context menu, allowing selecting all text and copying selection.
- Branch flow arrows in inspector now enlarge when hovered.
- Branch flow arrows in inspector are now clickable, directing to the other end of the arrow.
⚡ API Changes
- The button "Copy to Clipboard".
- Removed Newtonsoft.Json as a dependency
