//! Metal shader runtime errors. use librashader_preprocess::PreprocessError; use librashader_presets::ParsePresetError; use librashader_reflect::error::{ShaderCompileError, ShaderReflectError}; use librashader_runtime::image::ImageError; use thiserror::Error; use librashader_common::{FilterMode, WrapMode}; /// Cumulative error type for Metal filter chains. #[derive(Error, Debug)] pub enum FilterChainError { #[error("shader preset parse error")] ShaderPresetError(#[from] ParsePresetError), #[error("shader preprocess error")] ShaderPreprocessError(#[from] PreprocessError), #[error("shader compile error")] ShaderCompileError(#[from] ShaderCompileError), #[error("shader reflect error")] ShaderReflectError(#[from] ShaderReflectError), #[error("lut loading error")] LutLoadError(#[from] ImageError), #[error("sampler create error")] SamplerError(WrapMode, FilterMode, FilterMode), #[error("buffer creation error")] BufferError } /// Result type for Metal filter chains. pub type Result = std::result::Result;