Skip to main content

Instance

Struct Instance 

Source
pub struct Instance { /* private fields */ }
Expand description

A Vulkan instance.

Implementations§

Source§

impl Instance

Source

pub unsafe fn from_created( static_commands: &StaticCommands, info: &InstanceCreateInfo, instance: Instance, ) -> VkResult<Self>

Loads a Vulkan instance from a previously created vk::Instance.

§Safety

instance must have been created using static_commands and info.

Source

pub fn version(&self) -> Version

Gets the version for this Vulkan instance.

Source

pub fn extensions(&self) -> &BTreeSet<ExtensionName>

Gets the loaded extensions for this Vulkan instance.

Source

pub fn layers(&self) -> &BTreeSet<ExtensionName>

Gets the loaded layers for this Vulkan instance.

Source

pub unsafe fn create_device( &self, physical_device: PhysicalDevice, info: &DeviceCreateInfo, allocator: Option<&AllocationCallbacks>, ) -> VkResult<Device>

Creates a Vulkan device using this Vulkan instance.

§Safety

The Loader::load method will be called on the supplied Loader implementation to load the device commands so the safety requirements of Loader::load for the Loader implementation used must be upheld.

Trait Implementations§

Source§

impl Clone for Instance

Source§

fn clone(&self) -> Instance

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Instance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl InstanceV1_0 for Instance

Source§

fn commands(&self) -> &InstanceCommands

Source§

fn handle(&self) -> Instance

Source§

unsafe fn create_device( &self, physical_device: PhysicalDevice, create_info: &DeviceCreateInfo, allocator: Option<&AllocationCallbacks>, ) -> VkResult<Device>

Source§

unsafe fn destroy_instance(&self, allocator: Option<&AllocationCallbacks>)

Source§

unsafe fn enumerate_device_extension_properties( &self, physical_device: PhysicalDevice, layer_name: Option<&CStr>, ) -> VkResult<Vec<ExtensionProperties>>

Source§

unsafe fn enumerate_device_layer_properties( &self, physical_device: PhysicalDevice, ) -> VkResult<Vec<LayerProperties>>

Source§

unsafe fn enumerate_physical_devices(&self) -> VkResult<Vec<PhysicalDevice>>

Source§

unsafe fn get_device_proc_addr( &self, device: Device, name: &CStr, ) -> PFN_vkVoidFunction

Source§

unsafe fn get_physical_device_features( &self, physical_device: PhysicalDevice, ) -> PhysicalDeviceFeatures

Source§

unsafe fn get_physical_device_format_properties( &self, physical_device: PhysicalDevice, format: Format, ) -> FormatProperties

Source§

unsafe fn get_physical_device_image_format_properties( &self, physical_device: PhysicalDevice, format: Format, type_: ImageType, tiling: ImageTiling, usage: ImageUsageFlags, flags: ImageCreateFlags, ) -> VkResult<ImageFormatProperties>

Source§

unsafe fn get_physical_device_memory_properties( &self, physical_device: PhysicalDevice, ) -> PhysicalDeviceMemoryProperties

Source§

unsafe fn get_physical_device_properties( &self, physical_device: PhysicalDevice, ) -> PhysicalDeviceProperties

Source§

unsafe fn get_physical_device_queue_family_properties( &self, physical_device: PhysicalDevice, ) -> Vec<QueueFamilyProperties>

Source§

unsafe fn get_physical_device_sparse_image_format_properties( &self, physical_device: PhysicalDevice, format: Format, type_: ImageType, samples: SampleCountFlags, usage: ImageUsageFlags, tiling: ImageTiling, ) -> Vec<SparseImageFormatProperties>

Source§

impl Send for Instance

Source§

impl Sync for Instance

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<C> ArmDataGraphExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ArmPerformanceCountersByRegionExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ArmTensorsExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<C> ExtAcquireDrmDisplayExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ExtAcquireXlibDisplayExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ExtCalibratedTimestampsExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ExtDebugReportExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ExtDebugUtilsExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

unsafe fn cmd_begin_debug_utils_label_ext( &self, command_buffer: CommandBuffer, label_info: &DebugUtilsLabelEXT, )

Source§

unsafe fn cmd_end_debug_utils_label_ext(&self, command_buffer: CommandBuffer)

Source§

unsafe fn cmd_insert_debug_utils_label_ext( &self, command_buffer: CommandBuffer, label_info: &DebugUtilsLabelEXT, )

Source§

unsafe fn create_debug_utils_messenger_ext( &self, create_info: &DebugUtilsMessengerCreateInfoEXT, allocator: Option<&AllocationCallbacks>, ) -> VkResult<DebugUtilsMessengerEXT>

Source§

unsafe fn destroy_debug_utils_messenger_ext( &self, messenger: DebugUtilsMessengerEXT, allocator: Option<&AllocationCallbacks>, )

Source§

unsafe fn queue_begin_debug_utils_label_ext( &self, queue: Queue, label_info: &DebugUtilsLabelEXT, )

Source§

unsafe fn queue_end_debug_utils_label_ext(&self, queue: Queue)

Source§

unsafe fn queue_insert_debug_utils_label_ext( &self, queue: Queue, label_info: &DebugUtilsLabelEXT, )

Source§

unsafe fn set_debug_utils_object_name_ext( &self, device: Device, name_info: &DebugUtilsObjectNameInfoEXT, ) -> VkResult<()>

Source§

unsafe fn set_debug_utils_object_tag_ext( &self, device: Device, tag_info: &DebugUtilsObjectTagInfoEXT, ) -> VkResult<()>

Source§

unsafe fn submit_debug_utils_message_ext( &self, message_severity: DebugUtilsMessageSeverityFlagsEXT, message_types: DebugUtilsMessageTypeFlagsEXT, callback_data: &DebugUtilsMessengerCallbackDataEXT, )

Source§

impl<C> ExtDescriptorHeapExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ExtDirectModeDisplayExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ExtDirectfbSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ExtDisplaySurfaceCounterExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ExtFullScreenExclusiveExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ExtHeadlessSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ExtMetalSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ExtSampleLocationsExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> ExtToolingInfoExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<C> FuchsiaImagepipeSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> GgpStreamDescriptorSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> InstanceV1_1 for C
where C: InstanceV1_0 + ?Sized,

Source§

unsafe fn enumerate_physical_device_groups( &self, ) -> VkResult<Vec<PhysicalDeviceGroupProperties>>

Source§

unsafe fn get_physical_device_external_buffer_properties( &self, physical_device: PhysicalDevice, external_buffer_info: &PhysicalDeviceExternalBufferInfo, external_buffer_properties: &mut ExternalBufferProperties, )

Source§

unsafe fn get_physical_device_external_fence_properties( &self, physical_device: PhysicalDevice, external_fence_info: &PhysicalDeviceExternalFenceInfo, external_fence_properties: &mut ExternalFenceProperties, )

Source§

unsafe fn get_physical_device_external_semaphore_properties( &self, physical_device: PhysicalDevice, external_semaphore_info: &PhysicalDeviceExternalSemaphoreInfo, external_semaphore_properties: &mut ExternalSemaphoreProperties, )

Source§

unsafe fn get_physical_device_features2( &self, physical_device: PhysicalDevice, features: &mut PhysicalDeviceFeatures2, )

Source§

unsafe fn get_physical_device_format_properties2( &self, physical_device: PhysicalDevice, format: Format, format_properties: &mut FormatProperties2, )

Source§

unsafe fn get_physical_device_image_format_properties2( &self, physical_device: PhysicalDevice, image_format_info: &PhysicalDeviceImageFormatInfo2, image_format_properties: &mut ImageFormatProperties2, ) -> VkResult<()>

Source§

unsafe fn get_physical_device_memory_properties2( &self, physical_device: PhysicalDevice, memory_properties: &mut PhysicalDeviceMemoryProperties2, )

Source§

unsafe fn get_physical_device_properties2( &self, physical_device: PhysicalDevice, properties: &mut PhysicalDeviceProperties2, )

Source§

unsafe fn get_physical_device_queue_family_properties2( &self, physical_device: PhysicalDevice, ) -> Vec<QueueFamilyProperties2>

Source§

unsafe fn get_physical_device_sparse_image_format_properties2( &self, physical_device: PhysicalDevice, format_info: &PhysicalDeviceSparseImageFormatInfo2, ) -> Vec<SparseImageFormatProperties2>

Source§

impl<C> InstanceV1_3 for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<C> KhrAndroidSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrCalibratedTimestampsExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrCooperativeMatrixExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrDeviceGroupCreationExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrDeviceGroupExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrDisplayExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

unsafe fn create_display_mode_khr( &self, physical_device: PhysicalDevice, display: DisplayKHR, create_info: &DisplayModeCreateInfoKHR, allocator: Option<&AllocationCallbacks>, ) -> VkResult<DisplayModeKHR>

Source§

unsafe fn create_display_plane_surface_khr( &self, create_info: &DisplaySurfaceCreateInfoKHR, allocator: Option<&AllocationCallbacks>, ) -> VkResult<SurfaceKHR>

Source§

unsafe fn get_display_mode_properties_khr( &self, physical_device: PhysicalDevice, display: DisplayKHR, ) -> VkResult<Vec<DisplayModePropertiesKHR>>

Source§

unsafe fn get_display_plane_capabilities_khr( &self, physical_device: PhysicalDevice, mode: DisplayModeKHR, plane_index: u32, ) -> VkResult<DisplayPlaneCapabilitiesKHR>

Source§

unsafe fn get_display_plane_supported_displays_khr( &self, physical_device: PhysicalDevice, plane_index: u32, ) -> VkResult<Vec<DisplayKHR>>

Source§

unsafe fn get_physical_device_display_plane_properties_khr( &self, physical_device: PhysicalDevice, ) -> VkResult<Vec<DisplayPlanePropertiesKHR>>

Source§

unsafe fn get_physical_device_display_properties_khr( &self, physical_device: PhysicalDevice, ) -> VkResult<Vec<DisplayPropertiesKHR>>

Source§

impl<C> KhrExternalFenceCapabilitiesExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrExternalMemoryCapabilitiesExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrExternalSemaphoreCapabilitiesExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrFragmentShadingRateExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrGetDisplayProperties2ExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrGetPhysicalDeviceProperties2ExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

unsafe fn get_physical_device_features2_khr( &self, physical_device: PhysicalDevice, features: &mut PhysicalDeviceFeatures2, )

Source§

unsafe fn get_physical_device_format_properties2_khr( &self, physical_device: PhysicalDevice, format: Format, format_properties: &mut FormatProperties2, )

Source§

unsafe fn get_physical_device_image_format_properties2_khr( &self, physical_device: PhysicalDevice, image_format_info: &PhysicalDeviceImageFormatInfo2, image_format_properties: &mut ImageFormatProperties2, ) -> VkResult<()>

Source§

unsafe fn get_physical_device_memory_properties2_khr( &self, physical_device: PhysicalDevice, memory_properties: &mut PhysicalDeviceMemoryProperties2, )

Source§

unsafe fn get_physical_device_properties2_khr( &self, physical_device: PhysicalDevice, properties: &mut PhysicalDeviceProperties2, )

Source§

unsafe fn get_physical_device_queue_family_properties2_khr( &self, physical_device: PhysicalDevice, ) -> Vec<QueueFamilyProperties2>

Source§

unsafe fn get_physical_device_sparse_image_format_properties2_khr( &self, physical_device: PhysicalDevice, format_info: &PhysicalDeviceSparseImageFormatInfo2, ) -> Vec<SparseImageFormatProperties2>

Source§

impl<C> KhrGetSurfaceCapabilities2ExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrObjectRefreshExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrPerformanceQueryExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrSwapchainExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrVideoEncodeQueueExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrVideoQueueExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrWaylandSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrWin32SurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrXcbSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> KhrXlibSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> MvkIosSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> MvkMacosSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> NnViSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> NvAcquireWinrtDisplayExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> NvCooperativeMatrix2ExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> NvCooperativeMatrixExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> NvCooperativeVectorExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> NvCoverageReductionModeExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> NvExternalMemoryCapabilitiesExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> NvExternalMemorySciBufExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> NvExternalSciSync2ExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> NvExternalSciSyncExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> NvOpticalFlowExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> OhosSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> QnxScreenSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> SecUbmSurfaceExtensionInstanceCommands for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<C> InstanceV1_2 for C
where C: InstanceV1_0 + ?Sized,

Source§

impl<C> InstanceV1_4 for C
where C: InstanceV1_0 + ?Sized,