Added logic to enumerate and score physical devices, preferring discrete GPUs. Added NoSuitableGpu error variant and documentation for the selection process.
11 lines
319 B
Rust
11 lines
319 B
Rust
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error)]
|
|
pub enum RendererError {
|
|
#[error("Failed to load Vulkan library")]
|
|
LoadFailed(#[from] ash::LoadingError),
|
|
#[error("Failed to create Vulkan instance")]
|
|
InstanceCreateFailed(#[from] ash::vk::Result),
|
|
#[error("No suitable GPU found")]
|
|
NoSuitableGpu,
|
|
} |