Fixed a crash where the renderer would attempt to create a swapchain with u32::MAX dimensions when the OS didn't provide a preferred extent. Updated Renderer::new to accept window dimensions and use them as a fallback. Also renamed InstanceCreateFailed to VulkanError for better generality.
11 lines
290 B
Rust
11 lines
290 B
Rust
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error)]
|
|
pub enum RendererError {
|
|
#[error("Failed to load Vulkan library")]
|
|
LoadFailed(#[from] ash::LoadingError),
|
|
#[error("Vulkan error")]
|
|
VulkanError(#[from] ash::vk::Result),
|
|
#[error("No suitable GPU found")]
|
|
NoSuitableGpu,
|
|
} |