synvael/crates/renderer/src/error.rs

18 lines
621 B
Rust

use thiserror::Error;
#[derive(Debug, Error)]
pub enum RendererError {
/// The Vulkan library could not be loaded from the system.
#[error("Failed to load Vulkan library")]
LoadFailed(#[from] ash::LoadingError),
/// A raw Vulkan result indicated a failure.
#[error("Vulkan error")]
VulkanError(#[from] ash::vk::Result),
/// No GPU was found that meets the engine's requirements.
#[error("No suitable GPU found")]
NoSuitableGpu,
/// An error occurred during GPU memory allocation.
#[error("GPU allocation error")]
AllocationError(#[from] gpu_allocator::AllocationError),
}