aboutsummaryrefslogtreecommitdiff
path: root/stockton-render/src/error.rs
blob: 3441bb243898f0f0c4d2f83ab1a30a7746108590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//! Error types

use super::draw::target::TargetChainCreationError;

/// An error encountered creating a rendering context.
#[derive(Debug)]
pub enum CreationError {
    TargetChainCreationError(TargetChainCreationError),
    WindowError,
    BadSurface,

    DeviceError(hal::device::CreationError),

    OutOfMemoryError,

    SyncObjectError,

    NoShaderC,
    ShaderCError(shaderc::Error),
    ShaderModuleFailed(hal::device::ShaderError),
    RenderPassError,
    PipelineError(hal::pso::CreationError),
    BufferError(hal::buffer::CreationError),
    BufferNoMemory,

    SwapchainError(hal::window::CreationError),
    ImageViewError(hal::image::ViewError),

    BadDataError,
}

/// An error encountered when rendering.
/// Usually this is out of memory or something happened to the device/surface.
/// You'll likely need to exit or create a new context.
#[derive(Debug, Clone)]
pub enum FrameError {}