librashader/librashader-runtime-gl/src/error.rs

29 lines
1 KiB
Rust
Raw Normal View History

2022-11-22 09:44:38 +11:00
use gl::types::GLenum;
2022-12-02 09:11:42 +11:00
use librashader_runtime::image::ImageError;
2022-11-22 09:44:38 +11:00
use librashader_preprocess::PreprocessError;
use librashader_presets::ParsePresetError;
use librashader_reflect::error::{ShaderCompileError, ShaderReflectError};
use thiserror::Error;
#[derive(Error, Debug)]
pub enum FilterChainError {
#[error("fbo initialization error")]
FramebufferInit(GLenum),
#[error("SPIRV reflection error")]
SpirvCrossReflectError(#[from] spirv_cross::ErrorCode),
#[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")]
2022-11-30 17:38:05 +11:00
LutLoadError(#[from] ImageError),
2022-12-04 11:07:15 +11:00
#[error("opengl was not initialized")]
GLLoadError
2022-11-22 09:44:38 +11:00
}
2022-11-30 17:38:05 +11:00
pub type Result<T> = std::result::Result<T, FilterChainError>;