diff --git a/librashader-reflect/src/reflect/naga/mod.rs b/librashader-reflect/src/reflect/naga/mod.rs index 037fac2..cf9bf86 100644 --- a/librashader-reflect/src/reflect/naga/mod.rs +++ b/librashader-reflect/src/reflect/naga/mod.rs @@ -670,7 +670,7 @@ impl NagaReflect { let member_type = &module.types[member.ty].inner; - if let Some(parameter) = semantics.uniform_semantics.get_unique_semantic(&name) { + if let Some(parameter) = semantics.uniform_semantics.unique_semantic(&name) { let Some(typeinfo) = parameter.semantics.validate_type(&member_type) else { return Err(blame.error(SemanticsErrorKind::InvalidTypeForSemantic(name))); }; @@ -748,7 +748,7 @@ impl NagaReflect { } } } - } else if let Some(texture) = semantics.uniform_semantics.get_texture_semantic(&name) { + } else if let Some(texture) = semantics.uniform_semantics.texture_semantic(&name) { let Some(_typeinfo) = texture.semantics.validate_type(&member_type) else { return Err(blame.error(SemanticsErrorKind::InvalidTypeForSemantic(name))); }; @@ -847,7 +847,7 @@ impl NagaReflect { ) -> Result<(), ShaderReflectError> { let Some(semantic) = semantics .texture_semantics - .get_texture_semantic(texture.name) + .texture_semantic(texture.name) else { return Err( SemanticErrorBlame::Fragment.error(SemanticsErrorKind::UnknownSemantics( diff --git a/librashader-reflect/src/reflect/semantics.rs b/librashader-reflect/src/reflect/semantics.rs index 278fc89..ca4c4c2 100644 --- a/librashader-reflect/src/reflect/semantics.rs +++ b/librashader-reflect/src/reflect/semantics.rs @@ -318,11 +318,11 @@ impl UniformMeta for TextureSizeMeta { /// A trait for maps that can return texture semantic units. pub trait TextureSemanticMap { /// Get the texture semantic for the given variable name. - fn get_texture_semantic(&self, name: &str) -> Option>; + fn texture_semantic(&self, name: &str) -> Option>; } impl TextureSemanticMap for FastHashMap { - fn get_texture_semantic(&self, name: &str) -> Option> { + fn texture_semantic(&self, name: &str) -> Option> { match self.get(name) { None => { if let Some(semantics) = TextureSemantics::TEXTURE_SEMANTICS @@ -354,7 +354,7 @@ impl TextureSemanticMap for FastHashMap { } impl TextureSemanticMap for FastHashMap> { - fn get_texture_semantic(&self, name: &str) -> Option> { + fn texture_semantic(&self, name: &str) -> Option> { match self.get(name) { None => { if let Some(semantics) = TextureSemantics::TEXTURE_SEMANTICS @@ -387,11 +387,11 @@ impl TextureSemanticMap for FastHashMap> /// A trait for maps that can return unique semantic units. pub trait UniqueSemanticMap { /// Get the unique semantic for the given variable name. - fn get_unique_semantic(&self, name: &str) -> Option>; + fn unique_semantic(&self, name: &str) -> Option>; } impl UniqueSemanticMap for FastHashMap { - fn get_unique_semantic(&self, name: &str) -> Option> { + fn unique_semantic(&self, name: &str) -> Option> { match self.get(name) { // existing uniforms in the semantic map have priority None => match name {