Skip to content

librashader 0.4.0

Compare
Choose a tag to compare
@chyyran chyyran released this 07 Sep 03:25
· 212 commits to master since this release

Version 0.4.0 has the canonical C ABI version 1, and API version 1.

⚠️ The ABI changes previously announced in the release notes for the 0.3.x series have been pushed back to 0.5.0. This is only a Rust-semver breaking release. ⚠️

This is a buffered release mainly intended to deprecate librashader-spirv-cross while addressing the concerns raised in #111. Alongside it brings some bugfixes and semver-incompatible performance optimizations, mostly affecting the preset, preprocess, and reflect APIs.

If you only consume the runtime API, the only change that will affect you are changes to the FilterChainParameters trait.

C API consumers do not need to update their headers. This release is not C API-breaking.

Notable Changes

  • c3033cf reflect: port SPIRV-Cross usage to spirv-cross2
    • It is very clear that librashader-spirv-cross is unsound due to cross FFI unwind behaviour and inconsistent bindings. spirv-cross2 is a much more solid foundation to build upon.
    • This release allows Rust consumers to transition to librashader 0.4.0 with minimal changes while librashader-spirv-cross is deprecated and yanked.
  • c447e40 runtime: make runtime parameters explicitly thread safe.
    • Before, setting parameters through FFI in separate threads could possibly cause a data race, this closes the soundness hole, adhering to the documented thread-safety guarantees.
    • While the C API does not change, this incurs a semver-breaking change on the Rust API.
  • Direct3D 12 performance improvements
    • e934f17 d3d12: stop leaking resources in transition barriers.
    • 2e7c3b3 d3d12: use a shared heap for the filter chain rather than CreateCommittedResource.

ABI Changes Incoming

The next release in the 0.5.x series will be C ABI-incompatible to clean up some inconsistencies in the C ABI.

See #102 for more details.