Skip to content

Engine → RHI

rhi_error.h

Errors of the rhi module.

Enumerations

rhi_error

enum class rhi_error : u16 {
    DEVICE_CREATION_FAILED = 1,     // the API refused to create the device; the message carries its text
    DEVICE_LOST,                    // removed: DXGI_ERROR_DEVICE_REMOVED, VK_ERROR_DEVICE_LOST or a Fatal message
    OUT_OF_DATE,                    // resize it: the surface changed or a failed resize left no back buffers
    SWAPCHAIN_CREATION_FAILED,      // the API refused to create or resize the swapchain
    INVALID_DESC,                   // a device_desc or swapchain_desc field is invalid; the message names it
    PRESENT_FAILED,                 // acquire or present refused for a reason other than device loss or OUT_OF_DATE
    COUNT
};

Macros

CONJURE_DECLARE_ERROR_CATEGORY

CONJURE_DECLARE_ERROR_CATEGORY(conjure::rhi::rhi_error, "rhi", conjure::rhi::rhi_error_name)

Functions

Public

rhi_error_name

[[nodiscard]] CONJURE_API std::string_view rhi_error_name(
    rhi_error code) noexcept;

The enumerator name of an rhi error code ("DEVICE_LOST"), or "" for unknown values.