diff --git a/librashader-capi/src/reflect/mod.rs b/librashader-capi/src/reflect/mod.rs index f7cc2d2..719d0f8 100644 --- a/librashader-capi/src/reflect/mod.rs +++ b/librashader-capi/src/reflect/mod.rs @@ -6,7 +6,8 @@ use librashader::reflect::targets::SPIRV; use librashader::reflect::{CompileShader, ReflectShader, ShaderCompilerOutput, ShaderReflection}; use librashader::{FilterMode, WrapMode}; -use librashader::reflect::cross::GlslangCompilation; +use librashader::reflect::SpirvCompilation; +use librashader::reflect::f use librashader::reflect::helper::image::{Image, UVDirection, RGBA8}; pub(crate) struct LookupTexture { @@ -38,8 +39,9 @@ impl FilterReflection { let (passes, textures) = (preset.shaders, preset.textures); let (passes, semantics) = librashader::reflect::helper::compile_preset_passes::< + Glslang, SPIRV, - GlslangCompilation, + SpirvCompilation, error::LibrashaderError, >(passes, &textures)?; diff --git a/librashader-reflect/src/front/mod.rs b/librashader-reflect/src/front/mod.rs index f816187..929f5b8 100644 --- a/librashader-reflect/src/front/mod.rs +++ b/librashader-reflect/src/front/mod.rs @@ -14,7 +14,9 @@ pub trait ShaderInputCompiler: Sized { fn compile(source: &ShaderSource) -> Result; } +/// Marker trait for types that are the reflectable outputs of a shader compilation. impl ShaderReflectObject for SpirvCompilation {} + /// A reflectable shader compilation via glslang. #[cfg_attr(feature = "serialize", derive(Serialize, Deserialize))] #[derive(Debug, Clone)] diff --git a/librashader/src/lib.rs b/librashader/src/lib.rs index 9968981..4845aaa 100644 --- a/librashader/src/lib.rs +++ b/librashader/src/lib.rs @@ -150,7 +150,7 @@ pub mod reflect { FromCompilation, ShaderCompilerOutput, }; - pub use librashader_reflect::front::SpirvCompilation; + pub use librashader_reflect::front::{SpirvCompilation, Glslang, ShaderReflectObject }; /// Reflection via SPIRV-Cross. #[cfg(feature = "reflect-cross")]