Skip to main content

create_instance

Function create_instance 

Source
pub unsafe fn create_instance(
    entry: &Entry,
    create_info: &InstanceCreateInfo<'_>,
    allocator: Option<&AllocationCallbacks>,
) -> Result<Instance, CallError>
Expand description

Create a headless or extension-configured Vulkan instance.

§Errors

Reports host metadata/version-query failures before creation, driver errors, invalid native outputs and unavailable destruction. If rollback is impossible, CallError::InitializationFailed retains the native object for explicit recovery.

§Safety

The create info, its reachable pointers and allocator callbacks must meet Vulkan valid usage. Allocator state must remain alive until destruction.

Khronos reference: vkCreateInstance