doc: update ABI versions in version.rs and readme

This commit is contained in:
chyyran 2024-09-07 00:02:25 -04:00 committed by Ronny Chan
parent aeb0a16cfb
commit 4d790e7a7b
4 changed files with 17 additions and 3 deletions

View file

@ -214,7 +214,7 @@ and are more a heads-up for integrating librashader into your project.
## Versioning
[![Latest Version](https://img.shields.io/crates/v/librashader.svg)](https://crates.io/crates/librashader)
![C ABI](https://img.shields.io/badge/ABI%20version-1-yellowgreen)
![C ABI](https://img.shields.io/badge/ABI%20version-2-yellowgreen)
![C API](https://img.shields.io/badge/API%20version-1-blue)

View file

@ -1040,7 +1040,12 @@ typedef libra_error_t (*PFN_libra_mtl_filter_chain_free)(libra_mtl_filter_chain_
/// ## ABI Versions
/// - ABI version 0: null instance (unloaded)
/// - ABI version 1: 0.1.0
/// - ABI version 2: 0.4.0
/// - ABI version 2: 0.5.0
/// - Reduced texture size information needed for some runtimes.
/// - Removed wrapper structs for Direct3D 11 SRV and RTV handles.
/// - Removed `gl_context_init`.
/// - Make viewport handling consistent across runtimes, which are now
/// span the output render target if omitted.
#define LIBRASHADER_CURRENT_ABI 2
#ifdef __cplusplus

View file

@ -60,6 +60,9 @@
//! to the same context as the drawing thread, and in Direct3D 11, where filter chain creation is unsafe
//! if the `ID3D11Device` was created with `D3D11_CREATE_DEVICE_SINGLETHREADED`. Metal is entirely thread unsafe.
//!
//! Setting and retrieving filter parameters from any thread, regardless of the lack of other thread safety-guarantees
//! of the runtime, is always thread safe.
//!
//! You must ensure that only thread has access to a created filter pass **before** you call `*_frame`. `*_frame` may only be
//! called from one thread at a time.
#![cfg_attr(feature = "docsrs", feature(doc_cfg))]

View file

@ -28,10 +28,16 @@ pub const LIBRASHADER_CURRENT_VERSION: LIBRASHADER_API_VERSION = 1;
/// ABI versions are not backwards compatible. It is not
/// valid to load a librashader C API instance for any ABI
/// version not equal to LIBRASHADER_CURRENT_ABI.
///
/// ## ABI Versions
/// - ABI version 0: null instance (unloaded)
/// - ABI version 1: 0.1.0
/// - ABI version 2: 0.4.0
/// - ABI version 2: 0.5.0
/// - Reduced texture size information needed for some runtimes.
/// - Removed wrapper structs for Direct3D 11 SRV and RTV handles.
/// - Removed `gl_context_init`.
/// - Make viewport handling consistent across runtimes, which are now
/// span the output render target if omitted.
pub const LIBRASHADER_CURRENT_ABI: LIBRASHADER_ABI_VERSION = 2;
/// Function pointer definition for libra_abi_version