use crate::error::{ShaderReflectError}; use crate::reflect::semantics::{ SemanticMap, TextureImage, TextureSemantics, TextureSizeMeta, VariableMeta, VariableSemantics, }; use rustc_hash::FxHashMap; pub mod cross; mod naga; mod rspirv; pub mod semantics; pub trait ReflectShader { fn reflect(&mut self, pass_number: u32, semantics: &ReflectSemantics) -> Result; } #[derive(Debug)] pub enum UniformSemantic { Variable(SemanticMap), Texture(SemanticMap), } #[derive(Debug)] pub struct ReflectSemantics { pub uniform_semantics: FxHashMap, pub non_uniform_semantics: FxHashMap>, } #[derive(Debug, Default)] pub struct ReflectMeta { pub parameter_meta: FxHashMap, pub variable_meta: FxHashMap, pub texture_meta: FxHashMap, TextureImage>, pub texture_size_meta: FxHashMap, TextureSizeMeta>, } pub use semantics::ShaderReflection;