Struct vulkanalia::Instance

source ·
pub struct Instance { /* private fields */ }
Expand description

A Vulkan instance.

Implementations§

source§

impl 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 copy 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 ExtAcquireDrmDisplayExtension for Instance

source§

impl ExtAcquireXlibDisplayExtension for Instance

source§

impl ExtApplicationParametersExtension for Instance

source§

const METADATA: Extension = EXT_APPLICATION_PARAMETERS_EXTENSION

The metadata for this extension.
source§

impl ExtDebugReportExtension for Instance

source§

const METADATA: Extension = EXT_DEBUG_REPORT_EXTENSION

👎Deprecated: deprecated in favor of VK_EXT_debug_utils
The metadata for this extension.
source§

unsafe fn create_debug_report_callback_ext( &self, create_info: &DebugReportCallbackCreateInfoEXT, allocator: Option<&AllocationCallbacks> ) -> VkResult<DebugReportCallbackEXT>

👎Deprecated: deprecated in favor of VK_EXT_debug_utils
source§

unsafe fn debug_report_message_ext( &self, flags: DebugReportFlagsEXT, object_type: DebugReportObjectTypeEXT, object: u64, location: usize, message_code: i32, layer_prefix: &[u8], message: &[u8] )

👎Deprecated: deprecated in favor of VK_EXT_debug_utils
source§

unsafe fn destroy_debug_report_callback_ext( &self, callback: DebugReportCallbackEXT, allocator: Option<&AllocationCallbacks> )

👎Deprecated: deprecated in favor of VK_EXT_debug_utils
source§

impl ExtDebugUtilsExtension for Instance

source§

const METADATA: Extension = EXT_DEBUG_UTILS_EXTENSION

The metadata for this extension.
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 ExtDirectModeDisplayExtension for Instance

source§

const METADATA: Extension = EXT_DIRECT_MODE_DISPLAY_EXTENSION

The metadata for this extension.
source§

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

source§

impl ExtDirectfbSurfaceExtension for Instance

source§

impl ExtDisplaySurfaceCounterExtension for Instance

source§

impl ExtHeadlessSurfaceExtension for Instance

source§

impl ExtLayerSettingsExtension for Instance

source§

const METADATA: Extension = EXT_LAYER_SETTINGS_EXTENSION

The metadata for this extension.
source§

impl ExtMetalSurfaceExtension for Instance

source§

impl ExtSurfaceMaintenance1Extension for Instance

source§

const METADATA: Extension = EXT_SURFACE_MAINTENANCE1_EXTENSION

The metadata for this extension.
source§

impl ExtSwapchainColorspaceExtension for Instance

source§

const METADATA: Extension = EXT_SWAPCHAIN_COLORSPACE_EXTENSION

The metadata for this extension.
source§

impl ExtValidationFeaturesExtension for Instance

source§

const METADATA: Extension = EXT_VALIDATION_FEATURES_EXTENSION

👎Deprecated: deprecated in favor of VK_EXT_layer_settings
The metadata for this extension.
source§

impl ExtValidationFlagsExtension for Instance

source§

const METADATA: Extension = EXT_VALIDATION_FLAGS_EXTENSION

👎Deprecated: deprecated in favor of VK_EXT_layer_settings
The metadata for this extension.
source§

impl FuchsiaImagepipeSurfaceExtension for Instance

source§

impl GgpStreamDescriptorSurfaceExtension for Instance

source§

impl GoogleSurfacelessQueryExtension for Instance

source§

const METADATA: Extension = GOOGLE_SURFACELESS_QUERY_EXTENSION

The metadata for this extension.
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<&[u8]> ) -> 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_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 InstanceV1_1 for Instance

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 InstanceV1_3 for Instance

source§

impl KhrAndroidSurfaceExtension for Instance

source§

impl KhrDeviceGroupCreationExtension for Instance

source§

impl KhrDisplayExtension for Instance

source§

const METADATA: Extension = KHR_DISPLAY_EXTENSION

The metadata for this extension.
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 KhrExternalFenceCapabilitiesExtension for Instance

source§

const METADATA: Extension = KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION

The metadata for this extension.
source§

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

source§

impl KhrExternalMemoryCapabilitiesExtension for Instance

source§

const METADATA: Extension = KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION

The metadata for this extension.
source§

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

source§

impl KhrExternalSemaphoreCapabilitiesExtension for Instance

source§

const METADATA: Extension = KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION

The metadata for this extension.
source§

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

source§

impl KhrGetDisplayProperties2Extension for Instance

source§

impl KhrGetPhysicalDeviceProperties2Extension for Instance

source§

const METADATA: Extension = KHR_GET_PHYSICAL_DEVICE_PROPERTIES2_EXTENSION

The metadata for this extension.
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 KhrGetSurfaceCapabilities2Extension for Instance

source§

impl KhrPortabilityEnumerationExtension for Instance

source§

const METADATA: Extension = KHR_PORTABILITY_ENUMERATION_EXTENSION

The metadata for this extension.
source§

impl KhrSurfaceExtension for Instance

source§

impl KhrSurfaceProtectedCapabilitiesExtension for Instance

source§

const METADATA: Extension = KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION

The metadata for this extension.
source§

impl KhrWaylandSurfaceExtension for Instance

source§

impl KhrWin32SurfaceExtension for Instance

source§

impl KhrXcbSurfaceExtension for Instance

source§

impl KhrXlibSurfaceExtension for Instance

source§

impl LunargDirectDriverLoadingExtension for Instance

source§

const METADATA: Extension = LUNARG_DIRECT_DRIVER_LOADING_EXTENSION

The metadata for this extension.
source§

impl MvkIosSurfaceExtension for Instance

source§

const METADATA: Extension = MVK_IOS_SURFACE_EXTENSION

👎Deprecated: deprecated in favor of VK_EXT_metal_surface
The metadata for this extension.
source§

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

👎Deprecated: deprecated in favor of VK_EXT_metal_surface
source§

impl MvkMacosSurfaceExtension for Instance

source§

const METADATA: Extension = MVK_MACOS_SURFACE_EXTENSION

👎Deprecated: deprecated in favor of VK_EXT_metal_surface
The metadata for this extension.
source§

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

👎Deprecated: deprecated in favor of VK_EXT_metal_surface
source§

impl NnViSurfaceExtension for Instance

source§

impl NvExternalMemoryCapabilitiesExtension for Instance

source§

const METADATA: Extension = NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION

👎Deprecated: deprecated in favor of VK_KHR_external_memory_capabilities
The metadata for this extension.
source§

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

👎Deprecated: deprecated in favor of VK_KHR_external_memory_capabilities
source§

impl QnxScreenSurfaceExtension for Instance

source§

impl InstanceV1_2 for Instance

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<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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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<T> ToOwned for T
where T: Clone,

§

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>,

§

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>,

§

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.