com.unity.burst 1.6.0-pre.3
Notes: processedReleased July 30, 2021
Unity Compatibility
Minimum Unity: 2019.4
Package Dependencies
🔧 Bug Fixes
- Fixed a bug where methods with the same name and namespace, but in different assemblies, could resolve to the wrong method.
- Burst no longer logs a warning when opening the standalone Profiler
- Fixed an `UnauthorizedAccessException` that could occur when using Burst in players built for the macOS App Sandbox
- Fixed a bug that could cause an incorrect compilation error when using a primitive type as a generic argument in a static method entry point
- Crash due to member function debug information on tvOS.
- Fix documentation to make clear that `ref` / `out` parameters are supported on `[BurstDiscard]` methods.
- Fixed a `NullReferenceException` in the Burst compiler when multi-dimensional arrays were used. The compiler now produces a correct error message telling users that multi-dimensional arrays are not supported by Burst.
- Fixed DOTS Runtime Job Marshalling behaviour to properly handle marshalling generic Job types when not all closed forms of the generic type require marshalling.
- Fixed a Burst package warning in our editor compiler integration with respect to `BuildOptions.EnableHeadlessMode`.
- Fixed small race which could cause an unexpected exception when finishing a standalone compilation task.
- Building for Apple Silicon architecture on macOS would produce a universal binary, now it behaves correctly.
- tvOS/iOS and other statically linked platforms would fail to burst compile if the burst compiled code contained references to functions that were `[DllImport("__Internal")]`, due to a mismatch in calling convention.
- Fixed a bug whereby if you had `$"{too} {many} {fixed} {string} {formatted} {arguments}"` in a string formatter, Burst wouldn't be able to correctly understand how to transform this for the purposes of logging or fixed-string construction.
- Fixed where `Unity.Burst.CompilerServices.Constant.IsConstantExpression` is evaluated to be later in the compilation pipeline, to let it catch more constant expressions (for instance post-inlining).
- Rare non zero return code from bcl after successfully building..
- Only check assembly cache when the main-thread is requesting some Burst code - meaning that kicking off eager compilation is 1.6x faster than before.
- `stackalloc byte[]` with an array initializer was previously only supported when the `stackalloc` size was 8 or less. Sizes greater than 8 are now supported.
- Fixed an error that could occur with the form "System.InvalidOperationException: Could not find `burst.initialize` function in library 'SomeLibrary'"
- Fixed incorrect runtime behavior that could occur when casting a pointer to a generic type
- Fixed a bug where stackalloc's could be wrongly hoisted out of loops.
- Added [Preserve] attribute to prevent stripping a compiler service call
- Fixed incorrect compiler error that could occur when casting a pointer to a generic type and then calling a method with generic parameters
- Fixed incorrect compiler error that could occur with explicit-layout structs when setting a `Size` smaller than the natural struct size
✨ Features
- Universal (Apple Silicon + X64) versions of extra build tools
- Add Android x86\_64 and re-enable x86 support
- Added support for having `[MarshalAs(UnmanagedType.U1)]` or `[MarshalAs(UnmanagedType.I1)]` on a `bool` external function parameter.
- Neon intrinsics: Added vst1\* experimental APIs
- Added a global player build setting to let users specify the default optimization choice for Burst.
- Native support for Apple Silicon.
- Added support for `StructLayoutAttribute.Pack`
- Additional notes about `BurstCompiler.CompileFunctionPointer` regarding; avoid wrapping in another open generic method, and interoperability with IL2CPP.
⚡ API Changes
- Removed the `Enable Safety Checks` option for player builds, since it didn't actually enable safety checks in containers, which are editor only in Unity.
📈 Improvements
- Changed how we link object files for iOS and tvOS platforms such that Burst will now create the object file and hand it off to XCode for linking only.
- Assembly-level attributes (such as `[assembly: RegisterGenericJobType]`) are now scanned for generic job types to compile
- Fixed a regression that caused eager-compilation at Editor startup to be slower than it should have been
- `math.f16tof32` now uses hardware intrinsics where available (AVX2 / NEON).
- `half` to `float` or `double` vector conversions now produce more optimal codegen.
- Burst Inspector now remembers scroll position between domain reloads
- Changed how we schedule Burst eager compilation threads. Previously we'd spawn at most 8 of the threads, and only allow 2 to make progress while in the Editor (to ensure the editor UX/UI was as responsive as possible). Instead we now spawn `number_of_cores - 1` threads at a lower thread priority, ensuring that any computing power slack can be consumed to speed up Burst compilation. On a 24 core machine this resulted in 2.5x reduction in time taken for Burst to fully compile a large project.
- Fixed a potential error related to duplicate symbols when calling `BurstCompiler.CompileFunctionPointer` from inside Burst code
- Improved performance of checking the cache to see if methods have already been compiled
- For player builds : lib\_burst\_generated.txt, pdbs (in non development mode) and dysm folders are now placed into a xxx\_BurstDebugInformation\_DoNotShip folder alongside the data folder, this is to ensure it is easy to remove the files that you should not ship with your player.
⚠️ Known Issues
- Code that previously mixed managed or non-`readonly` static fields with Burst compiled code will now fail to compile.
