diff --git a/lyra-game/src/render/texture.rs b/lyra-game/src/render/texture.rs index 0022f07..e17a0ab 100755 --- a/lyra-game/src/render/texture.rs +++ b/lyra-game/src/render/texture.rs @@ -307,6 +307,7 @@ impl RenderTexture { } /// Convert [`lyra_resource::WrappingMode`] to [`wgpu::AddressMode`] +#[inline(always)] fn res_wrap_to_wgpu(wmode: WrappingMode) -> wgpu::AddressMode { match wmode { WrappingMode::ClampToEdge => wgpu::AddressMode::ClampToEdge, @@ -316,6 +317,7 @@ fn res_wrap_to_wgpu(wmode: WrappingMode) -> wgpu::AddressMode { } /// Convert [`lyra_resource::FilterMode`] to [`wgpu::FilterMode`] +#[inline(always)] fn res_filter_to_wgpu(fmode: FilterMode) -> wgpu::FilterMode { match fmode { FilterMode::Nearest => wgpu::FilterMode::Nearest, diff --git a/lyra-resource/src/gltf/material.rs b/lyra-resource/src/gltf/material.rs index 696ac00..1adeed0 100644 --- a/lyra-resource/src/gltf/material.rs +++ b/lyra-resource/src/gltf/material.rs @@ -319,6 +319,7 @@ impl Material { } impl From for FilterMode { + #[inline(always)] fn from(value: gltf::texture::MagFilter) -> Self { match value { gltf::texture::MagFilter::Nearest => Self::Nearest, @@ -329,6 +330,7 @@ impl From for FilterMode { impl FilterMode { /// Get the MinFilter mode and the mipmap filter mode from gltf MinFilter + #[inline(always)] pub fn from_min_filter(minf: MinFilter) -> FilterMode { match minf { MinFilter::Nearest => FilterMode::Nearest, @@ -340,6 +342,7 @@ impl FilterMode { } } + #[inline(always)] pub fn from_mag_filter(magf: MagFilter) -> FilterMode { match magf { MagFilter::Nearest => FilterMode::Nearest, @@ -347,6 +350,7 @@ impl FilterMode { } } + #[inline(always)] pub fn mipmap_filter(minf: MinFilter) -> Option { match minf { MinFilter::Nearest => None, @@ -360,6 +364,7 @@ impl FilterMode { } impl From for WrappingMode { + #[inline(always)] fn from(value: gltf::texture::WrappingMode) -> Self { match value { gltf::texture::WrappingMode::ClampToEdge => Self::ClampToEdge,