diff --git a/librashader-capi/src/runtime/d3d11/filter_chain.rs b/librashader-capi/src/runtime/d3d11/filter_chain.rs index 1345616..c5aa1ca 100644 --- a/librashader-capi/src/runtime/d3d11/filter_chain.rs +++ b/librashader-capi/src/runtime/d3d11/filter_chain.rs @@ -267,7 +267,7 @@ extern_fn! { let name = CStr::from_ptr(param_name); let name = name.to_str()?; - if chain.parameters().set_parameter(name, value).is_none() { + if chain.parameters().set_parameter_value(name, value).is_none() { return LibrashaderError::UnknownShaderParameter(param_name).export() } } @@ -292,7 +292,7 @@ extern_fn! { let name = CStr::from_ptr(param_name); let name = name.to_str()?; - let Some(value) = chain.parameters().get_parameter(name) else { + let Some(value) = chain.parameters().parameter_value(name) else { return LibrashaderError::UnknownShaderParameter(param_name).export() }; diff --git a/librashader-capi/src/runtime/d3d12/filter_chain.rs b/librashader-capi/src/runtime/d3d12/filter_chain.rs index 8a115d5..bda7972 100644 --- a/librashader-capi/src/runtime/d3d12/filter_chain.rs +++ b/librashader-capi/src/runtime/d3d12/filter_chain.rs @@ -287,7 +287,7 @@ extern_fn! { let name = CStr::from_ptr(param_name); let name = name.to_str()?; - if chain.parameters().set_parameter(name, value).is_none() { + if chain.parameters().set_parameter_value(name, value).is_none() { return LibrashaderError::UnknownShaderParameter(param_name).export() } } @@ -312,7 +312,7 @@ extern_fn! { let name = CStr::from_ptr(param_name); let name = name.to_str()?; - let Some(value) = chain.parameters().get_parameter(name) else { + let Some(value) = chain.parameters().parameter_value(name) else { return LibrashaderError::UnknownShaderParameter(param_name).export() }; diff --git a/librashader-capi/src/runtime/d3d9/filter_chain.rs b/librashader-capi/src/runtime/d3d9/filter_chain.rs index e9770b3..3be1c6f 100644 --- a/librashader-capi/src/runtime/d3d9/filter_chain.rs +++ b/librashader-capi/src/runtime/d3d9/filter_chain.rs @@ -177,7 +177,7 @@ extern_fn! { let name = CStr::from_ptr(param_name); let name = name.to_str()?; - if chain.parameters().set_parameter(name, value).is_none() { + if chain.parameters().set_parameter_value(name, value).is_none() { return LibrashaderError::UnknownShaderParameter(param_name).export() } } @@ -202,7 +202,7 @@ extern_fn! { let name = CStr::from_ptr(param_name); let name = name.to_str()?; - let Some(value) = chain.parameters().get_parameter(name) else { + let Some(value) = chain.parameters().parameter_value(name) else { return LibrashaderError::UnknownShaderParameter(param_name).export() }; diff --git a/librashader-capi/src/runtime/gl/filter_chain.rs b/librashader-capi/src/runtime/gl/filter_chain.rs index f42ba47..dc19559 100644 --- a/librashader-capi/src/runtime/gl/filter_chain.rs +++ b/librashader-capi/src/runtime/gl/filter_chain.rs @@ -234,7 +234,7 @@ extern_fn! { let name = CStr::from_ptr(param_name); let name = name.to_str()?; - if chain.parameters().set_parameter(name, value).is_none() { + if chain.parameters().set_parameter_value(name, value).is_none() { return LibrashaderError::UnknownShaderParameter(param_name).export() } } @@ -259,7 +259,7 @@ extern_fn! { let name = CStr::from_ptr(param_name); let name = name.to_str()?; - let Some(value) = chain.parameters().get_parameter(name) else { + let Some(value) = chain.parameters().parameter_value(name) else { return LibrashaderError::UnknownShaderParameter(param_name).export() }; diff --git a/librashader-capi/src/runtime/mtl/filter_chain.rs b/librashader-capi/src/runtime/mtl/filter_chain.rs index 5821e89..32425d1 100644 --- a/librashader-capi/src/runtime/mtl/filter_chain.rs +++ b/librashader-capi/src/runtime/mtl/filter_chain.rs @@ -235,7 +235,7 @@ extern_fn! { let name = CStr::from_ptr(param_name); let name = name.to_str()?; - if chain.parameters().set_parameter(name, value).is_none() { + if chain.parameters().set_parameter_value(name, value).is_none() { return LibrashaderError::UnknownShaderParameter(param_name).export() } } @@ -260,7 +260,7 @@ extern_fn! { let name = CStr::from_ptr(param_name); let name = name.to_str()?; - let Some(value) = chain.parameters().get_parameter(name) else { + let Some(value) = chain.parameters().parameter_value(name) else { return LibrashaderError::UnknownShaderParameter(param_name).export() }; diff --git a/librashader-capi/src/runtime/vk/filter_chain.rs b/librashader-capi/src/runtime/vk/filter_chain.rs index 20040d3..5f51e16 100644 --- a/librashader-capi/src/runtime/vk/filter_chain.rs +++ b/librashader-capi/src/runtime/vk/filter_chain.rs @@ -313,7 +313,7 @@ extern_fn! { let name = CStr::from_ptr(param_name); let name = name.to_str()?; - if chain.parameters().set_parameter(name, value).is_none() { + if chain.parameters().set_parameter_value(name, value).is_none() { return LibrashaderError::UnknownShaderParameter(param_name).export() } } @@ -338,7 +338,7 @@ extern_fn! { let name = CStr::from_ptr(param_name); let name = name.to_str()?; - let Some(value) = chain.parameters().get_parameter(name) else { + let Some(value) = chain.parameters().parameter_value(name) else { return LibrashaderError::UnknownShaderParameter(param_name).export() }; diff --git a/librashader-runtime/src/parameters.rs b/librashader-runtime/src/parameters.rs index 0bdb8ce..9ba0fe4 100644 --- a/librashader-runtime/src/parameters.rs +++ b/librashader-runtime/src/parameters.rs @@ -35,14 +35,14 @@ impl RuntimeParameters { } /// Get the value of a runtime parameter - pub fn get_parameter(&self, name: &str) -> Option { + pub fn parameter_value(&self, name: &str) -> Option { self.parameters.load().get::(name.as_ref()).copied() } /// Set a runtime parameter. /// /// This is a relatively slow operation as it will be synchronized across threads. - pub fn set_parameter(&self, name: &str, new_value: f32) -> Option { + pub fn set_parameter_value(&self, name: &str, new_value: f32) -> Option { let mut updated_map = FastHashMap::clone(&self.parameters.load()); if let Some(value) = updated_map.get_mut::(name.as_ref()) {