librashader 0.5.0
chyyran
released this
06 Oct 05:10
·
14 commits
to master
since this release
Version 0.5.0 has the canonical C ABI version 2
, and API version 1
.
This is the first release since 0.1.0 with a bump in ABI version, and is thus ABI-incompatible with versions of librashader prior to 0.5.0. Trying to load this version of librashader if the application only supports ABI 1 will fail.
- If you are an end-user, please use librashader 0.4.5 until the developer has updated their application.
- If you are a developer, see MIGRATION-ABI2.md on how to update your application to support librashader ABI 2.
- If you are a package maintainer, you may want to postpone packaging librashader 0.5.0 until relevant applications have been updated. Note that the
SONAME
for librashader 0.5.0 and above should belibrashader.so.2
.
ABI 2 cleans up some inconsistencies across runtimes and makes viewport handling much easier and well defined.
Notable Changes
- #129 cli: add a
librashader-cli
to interact with shader presets and source code.- See CLI.md for more details and usage notes
- presets: introduce the concept of a "shader pack", which is a JSON-serializable format for packaging a shader preset into a single file.
- A preset pack includes all required textures and preprocessed shader source files. This is a prerequisite for running librashader on environments without filesystems such as the web.
- All runtimes support loading from a
ShaderPresetPack
, which implementsSerialize
/Deserialize
with theserde
crate feature. - Preset packs can be created with the
librashader-cli pack
command, but this format should not yet be considered stable. - There are no plans for a C API that works with preset packs directly.
- aeb0a16 vulkan: allow specifying the graphics queue to use
- OpenGL changes and improvements
- #102 Major ABI breaking changes to the C API
- 1e33b4c capi: make
viewport
optional and default to a viewport that spans the entire texture - 61fdaee capi(opengl): take
libra_gl_loader_t
in filter chain constructor - f18c22a capi(d3d11): take
ID3D11ShaderResourceView*
directly - 7a13136 capi(d3d12): allow passing
ID3D12Resource*
directly without needing an externally allocated CPU descriptor
- 1e33b4c capi: make
- Direct3D performance optimizations and fixes
- b0df631 d3d9: load LUTs with BGRA8 ordering rather than ARGB8
- dbfa822 d3d9: disable alpha blending
- 7d483f2 d3d9: take viewport
IDirect3DSurface9
by reference to avoidAddRef
/Release
- 2fe7702 d3d11: avoid
QueryInterface
when getting the dimensions of a texture - 7b7fd99 d3d11: take viewport
ID3D11RenderTargetView
by reference to avoidAddRef
/Release
- 3c20c83 d3d12: take
D3D12InputImage
without changing the refcount - 7a13136 d3d12: allow the filter chain to optionally manage input/output descriptors
- c57e502 d3d12: reduce unnecessary refcount increment/decrement for resources that last the lifetime of the filter chain