capi: undo const qualification of chain in _filter_chain_get_param and _filter_chain_get_active_pass_count

This should be done over an ABI bump, even if the headers weren't updated.
This commit is contained in:
chyyran 2024-09-13 17:17:18 -04:00 committed by Ronny Chan
parent 6f5b342c1b
commit 98d8d91c66
7 changed files with 18 additions and 24 deletions

View file

@ -359,9 +359,9 @@ typedef struct _filter_chain_d3d11 *libra_d3d11_filter_chain_t;
typedef struct libra_source_image_d3d11_t { typedef struct libra_source_image_d3d11_t {
/// A shader resource view into the source image /// A shader resource view into the source image
ID3D11ShaderResourceView * handle; ID3D11ShaderResourceView * handle;
/// The width of the source image. /// This is currently ignored.
uint32_t width; uint32_t width;
/// The height of the source image. /// This is currently ignored.
uint32_t height; uint32_t height;
} libra_source_image_d3d11_t; } libra_source_image_d3d11_t;
#endif #endif
@ -452,11 +452,11 @@ typedef struct libra_source_image_d3d12_t {
ID3D12Resource * resource; ID3D12Resource * resource;
/// A CPU descriptor handle to a shader resource view of the image. /// A CPU descriptor handle to a shader resource view of the image.
D3D12_CPU_DESCRIPTOR_HANDLE descriptor; D3D12_CPU_DESCRIPTOR_HANDLE descriptor;
/// The format of the image. /// This is currently ignored.
DXGI_FORMAT format; DXGI_FORMAT format;
/// The width of the source image. /// This is currently ignored.
uint32_t width; uint32_t width;
/// The height of the source image. /// This is currently ignored.
uint32_t height; uint32_t height;
} libra_source_image_d3d12_t; } libra_source_image_d3d12_t;
#endif #endif
@ -1577,9 +1577,6 @@ libra_error_t libra_d3d9_filter_chain_create(libra_shader_preset_t *preset,
#if (defined(_WIN32) && defined(LIBRA_RUNTIME_D3D9)) #if (defined(_WIN32) && defined(LIBRA_RUNTIME_D3D9))
/// Draw a frame with the given parameters for the given filter chain. /// Draw a frame with the given parameters for the given filter chain.
/// ///
/// If `device_context` is null, then commands are recorded onto the immediate context. Otherwise,
/// it will record commands onto the provided context. If the context is deferred, librashader
/// will not finalize command lists. The context must otherwise be associated with the `Id3d9Device`
/// ///
/// ## Safety /// ## Safety
/// - `chain` may be null, invalid, but not uninitialized. If `chain` is null or invalid, this /// - `chain` may be null, invalid, but not uninitialized. If `chain` is null or invalid, this
@ -1589,10 +1586,7 @@ libra_error_t libra_d3d9_filter_chain_create(libra_shader_preset_t *preset,
/// - `opt` may be null, or if it is not null, must be an aligned pointer to a valid `frame_d3d9_opt_t` /// - `opt` may be null, or if it is not null, must be an aligned pointer to a valid `frame_d3d9_opt_t`
/// struct. /// struct.
/// - `out` must not be null. /// - `out` must not be null.
/// - `image.handle` must not be null. /// - `image` must not be null.
/// - If `device_context` is null, commands will be recorded onto the immediate context of the `Id3d9Device`
/// this filter chain was created with. The context must otherwise be associated with the `Id3d9Device`
/// the filter chain was created with.
/// - You must ensure that only one thread has access to `chain` before you call this function. Only one /// - You must ensure that only one thread has access to `chain` before you call this function. Only one
/// thread at a time may call this function. /// thread at a time may call this function.
libra_error_t libra_d3d9_filter_chain_frame(libra_d3d9_filter_chain_t *chain, libra_error_t libra_d3d9_filter_chain_frame(libra_d3d9_filter_chain_t *chain,
@ -1917,7 +1911,7 @@ LIBRASHADER_API_VERSION libra_instance_api_version(void);
/// ///
/// These automatically inferred variables, as well as all other variables can be overridden with /// These automatically inferred variables, as well as all other variables can be overridden with
/// `libra_preset_ctx_set_param`, but the expected string values must be provided. /// `libra_preset_ctx_set_param`, but the expected string values must be provided.
/// See https://github.com/libretro/RetroArch/pull/15023 for a list of expected string values. /// See <https://github.com/libretro/RetroArch/pull/15023> for a list of expected string values.
/// ///
/// No variables can be removed once added to the context, however subsequent calls to set the same /// No variables can be removed once added to the context, however subsequent calls to set the same
/// variable will overwrite the expected variable. /// variable will overwrite the expected variable.

View file

@ -282,7 +282,7 @@ extern_fn! {
/// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_d3d11_filter_chain_t`. /// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_d3d11_filter_chain_t`.
/// - `param_name` must be either null or a null terminated string. /// - `param_name` must be either null or a null terminated string.
fn libra_d3d11_filter_chain_get_param( fn libra_d3d11_filter_chain_get_param(
chain: *const libra_d3d11_filter_chain_t, chain: *mut libra_d3d11_filter_chain_t,
param_name: *const c_char, param_name: *const c_char,
out: *mut MaybeUninit<f32> out: *mut MaybeUninit<f32>
) |chain| { ) |chain| {
@ -321,7 +321,7 @@ extern_fn! {
/// ## Safety /// ## Safety
/// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_d3d11_filter_chain_t`. /// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_d3d11_filter_chain_t`.
fn libra_d3d11_filter_chain_get_active_pass_count( fn libra_d3d11_filter_chain_get_active_pass_count(
chain: *const libra_d3d11_filter_chain_t, chain: *mut libra_d3d11_filter_chain_t,
out: *mut MaybeUninit<u32> out: *mut MaybeUninit<u32>
) |chain| { ) |chain| {
assert_some_ptr!(chain); assert_some_ptr!(chain);

View file

@ -302,7 +302,7 @@ extern_fn! {
/// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_d3d12_filter_chain_t`. /// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_d3d12_filter_chain_t`.
/// - `param_name` must be either null or a null terminated string. /// - `param_name` must be either null or a null terminated string.
fn libra_d3d12_filter_chain_get_param( fn libra_d3d12_filter_chain_get_param(
chain: *const libra_d3d12_filter_chain_t, chain: *mut libra_d3d12_filter_chain_t,
param_name: *const c_char, param_name: *const c_char,
out: *mut MaybeUninit<f32> out: *mut MaybeUninit<f32>
) |chain| { ) |chain| {
@ -341,7 +341,7 @@ extern_fn! {
/// ## Safety /// ## Safety
/// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_d3d12_filter_chain_t`. /// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_d3d12_filter_chain_t`.
fn libra_d3d12_filter_chain_get_active_pass_count( fn libra_d3d12_filter_chain_get_active_pass_count(
chain: *const libra_d3d12_filter_chain_t, chain: *mut libra_d3d12_filter_chain_t,
out: *mut MaybeUninit<u32> out: *mut MaybeUninit<u32>
) |chain| { ) |chain| {
assert_some_ptr!(chain); assert_some_ptr!(chain);

View file

@ -192,7 +192,7 @@ extern_fn! {
/// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_d3d9_filter_chain_t`. /// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_d3d9_filter_chain_t`.
/// - `param_name` must be either null or a null terminated string. /// - `param_name` must be either null or a null terminated string.
fn libra_d3d9_filter_chain_get_param( fn libra_d3d9_filter_chain_get_param(
chain: *const libra_d3d9_filter_chain_t, chain: *mut libra_d3d9_filter_chain_t,
param_name: *const c_char, param_name: *const c_char,
out: *mut MaybeUninit<f32> out: *mut MaybeUninit<f32>
) |chain| { ) |chain| {
@ -231,7 +231,7 @@ extern_fn! {
/// ## Safety /// ## Safety
/// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_d3d9_filter_chain_t`. /// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_d3d9_filter_chain_t`.
fn libra_d3d9_filter_chain_get_active_pass_count( fn libra_d3d9_filter_chain_get_active_pass_count(
chain: *const libra_d3d9_filter_chain_t, chain: *mut libra_d3d9_filter_chain_t,
out: *mut MaybeUninit<u32> out: *mut MaybeUninit<u32>
) |chain| { ) |chain| {
assert_some_ptr!(chain); assert_some_ptr!(chain);

View file

@ -249,7 +249,7 @@ extern_fn! {
/// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_gl_filter_chain_t`. /// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_gl_filter_chain_t`.
/// - `param_name` must be either null or a null terminated string. /// - `param_name` must be either null or a null terminated string.
fn libra_gl_filter_chain_get_param( fn libra_gl_filter_chain_get_param(
chain: *const libra_gl_filter_chain_t, chain: *mut libra_gl_filter_chain_t,
param_name: *const c_char, param_name: *const c_char,
out: *mut MaybeUninit<f32> out: *mut MaybeUninit<f32>
) |chain| { ) |chain| {

View file

@ -250,7 +250,7 @@ extern_fn! {
/// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_mtl_filter_chain_t`. /// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_mtl_filter_chain_t`.
/// - `param_name` must be either null or a null terminated string. /// - `param_name` must be either null or a null terminated string.
fn libra_mtl_filter_chain_get_param( fn libra_mtl_filter_chain_get_param(
chain: *const libra_mtl_filter_chain_t, chain: *mut libra_mtl_filter_chain_t,
param_name: *const c_char, param_name: *const c_char,
out: *mut MaybeUninit<f32> out: *mut MaybeUninit<f32>
) |chain| { ) |chain| {
@ -289,7 +289,7 @@ extern_fn! {
/// ## Safety /// ## Safety
/// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_mtl_filter_chain_t`. /// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_mtl_filter_chain_t`.
fn libra_mtl_filter_chain_get_active_pass_count( fn libra_mtl_filter_chain_get_active_pass_count(
chain: *const libra_mtl_filter_chain_t, chain: *mut libra_mtl_filter_chain_t,
out: *mut MaybeUninit<u32> out: *mut MaybeUninit<u32>
) |chain| { ) |chain| {
assert_some_ptr!(chain); assert_some_ptr!(chain);

View file

@ -328,7 +328,7 @@ extern_fn! {
/// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_vk_filter_chain_t`. /// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_vk_filter_chain_t`.
/// - `param_name` must be either null or a null terminated string. /// - `param_name` must be either null or a null terminated string.
fn libra_vk_filter_chain_get_param( fn libra_vk_filter_chain_get_param(
chain: *const libra_vk_filter_chain_t, chain: *mut libra_vk_filter_chain_t,
param_name: *const c_char, param_name: *const c_char,
out: *mut MaybeUninit<f32> out: *mut MaybeUninit<f32>
) |chain| { ) |chain| {
@ -367,7 +367,7 @@ extern_fn! {
/// ## Safety /// ## Safety
/// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_vk_filter_chain_t`. /// - `chain` must be either null or a valid and aligned pointer to an initialized `libra_vk_filter_chain_t`.
fn libra_vk_filter_chain_get_active_pass_count( fn libra_vk_filter_chain_get_active_pass_count(
chain: *const libra_vk_filter_chain_t, chain: *mut libra_vk_filter_chain_t,
out: *mut MaybeUninit<u32> out: *mut MaybeUninit<u32>
) |chain| { ) |chain| {
assert_some_ptr!(chain); assert_some_ptr!(chain);