Instance

Struct Instance 

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

Implementations§

Source§

impl Instance

Source

pub unsafe fn create(create_info: &InstanceCreateInfo<'_>) -> Result<Self>

Source

pub unsafe fn destroy(self)

Source

pub fn validation_layers(&self) -> bool

Methods from Deref<Target = Instance>§

Source

pub fn handle(&self) -> Instance

Source

pub fn fns(&self) -> &InstanceFunctions

Source

pub unsafe fn get_device_proc_addr( &self, device: Device, p_name: *const i8, ) -> *const c_void

Chapter: Initialization
Description: Return a function pointer for a command
Provided by: VK_VERSION_1_0
Reference: vkGetDeviceProcAddr

Source

pub unsafe fn destroy_instance(&self)

Chapter: Initialization
Description: Destroy an instance of Vulkan
Provided by: VK_VERSION_1_0
Reference: vkDestroyInstance

Source

pub unsafe fn enumerate_physical_devices( &self, p_physical_device_count: *mut u32, p_physical_devices: *mut PhysicalDevice, ) -> Result<(), Error>

Chapter: Devices and Queues
Description: Enumerates the physical devices accessible to a Vulkan instance
Provided by: VK_VERSION_1_0
Reference: vkEnumeratePhysicalDevices

Source

pub unsafe fn get_physical_device_properties2( &self, physical_device: PhysicalDevice, p_properties: *mut PhysicalDeviceProperties2, )

Chapter: Devices and Queues
Description: Returns properties of a physical device
Provided by: VK_VERSION_1_1
Reference: vkGetPhysicalDeviceProperties2

Source

pub unsafe fn get_physical_device_queue_family_properties2( &self, physical_device: PhysicalDevice, p_queue_family_property_count: *mut u32, p_queue_family_properties: *mut QueueFamilyProperties2, )

Chapter: Devices and Queues
Description: Reports properties of the queues of the specified physical device
Provided by: VK_VERSION_1_1
Reference: vkGetPhysicalDeviceQueueFamilyProperties2

Source

pub unsafe fn create_device( &self, physical_device: PhysicalDevice, p_create_info: *const DeviceCreateInfo, ) -> Result<Device, Error>

Chapter: Devices and Queues
Description: Create a new device instance
Provided by: VK_VERSION_1_0
Reference: vkCreateDevice

Source

pub unsafe fn get_physical_device_memory_properties2( &self, physical_device: PhysicalDevice, p_memory_properties: *mut PhysicalDeviceMemoryProperties2, )

Chapter: Memory Allocation
Description: Reports memory information for the specified physical device
Provided by: VK_VERSION_1_1
Reference: vkGetPhysicalDeviceMemoryProperties2

Source

pub unsafe fn create_win32_surface_khr( &self, p_create_info: *const Win32SurfaceCreateInfoKHR, ) -> Result<SurfaceKHR, Error>

Chapter: Window System Integration (WSI)
Description: Create a VkSurfaceKHR object for an Win32 native window
Provided by: VK_KHR_win32_surface
Reference: vkCreateWin32SurfaceKHR

Source

pub unsafe fn destroy_surface_khr(&self, surface: SurfaceKHR)

Chapter: Window System Integration (WSI)
Description: Destroy a VkSurfaceKHR object
Provided by: VK_KHR_surface
Reference: vkDestroySurfaceKHR

Source

pub unsafe fn get_physical_device_surface_support_khr( &self, physical_device: PhysicalDevice, queue_family_index: u32, surface: SurfaceKHR, ) -> Result<u32, Error>

Chapter: Window System Integration (WSI)
Description: Query if presentation is supported
Provided by: VK_KHR_surface
Reference: vkGetPhysicalDeviceSurfaceSupportKHR

Source

pub unsafe fn get_physical_device_surface_capabilities_khr( &self, physical_device: PhysicalDevice, surface: SurfaceKHR, ) -> Result<SurfaceCapabilitiesKHR, Error>

Chapter: Window System Integration (WSI)
Description: Query surface capabilities
Provided by: VK_KHR_surface
Reference: vkGetPhysicalDeviceSurfaceCapabilitiesKHR

Source

pub unsafe fn get_physical_device_surface_formats_khr( &self, physical_device: PhysicalDevice, surface: SurfaceKHR, p_surface_format_count: *mut u32, p_surface_formats: *mut SurfaceFormatKHR, ) -> Result<(), Error>

Chapter: Window System Integration (WSI)
Description: Query color formats supported by surface
Provided by: VK_KHR_surface
Reference: vkGetPhysicalDeviceSurfaceFormatsKHR

Source

pub unsafe fn get_physical_device_surface_present_modes_khr( &self, physical_device: PhysicalDevice, surface: SurfaceKHR, p_present_mode_count: *mut u32, p_present_modes: *mut PresentModeKHR, ) -> Result<(), Error>

Chapter: Window System Integration (WSI)
Description: Query supported presentation modes
Provided by: VK_KHR_surface
Reference: vkGetPhysicalDeviceSurfacePresentModesKHR

Source

pub unsafe fn get_physical_device_calibrateable_time_domains_ext( &self, physical_device: PhysicalDevice, p_time_domain_count: *mut u32, p_time_domains: *mut TimeDomainEXT, ) -> Result<(), Error>

Chapter: Additional Capabilities
Description: Query calibrateable time domains
Provided by: VK_EXT_calibrated_timestamps
Reference: vkGetPhysicalDeviceCalibrateableTimeDomainsEXT

Source

pub unsafe fn create_debug_utils_messenger_ext( &self, p_create_info: *const DebugUtilsMessengerCreateInfoEXT, ) -> Result<DebugUtilsMessengerEXT, Error>

Chapter: Debugging
Description: Create a debug messenger object
Provided by: VK_EXT_debug_utils
Reference: vkCreateDebugUtilsMessengerEXT

Source

pub unsafe fn destroy_debug_utils_messenger_ext( &self, messenger: DebugUtilsMessengerEXT, )

Chapter: Debugging
Description: Destroy a debug messenger object
Provided by: VK_EXT_debug_utils
Reference: vkDestroyDebugUtilsMessengerEXT

Trait Implementations§

Source§

impl Debug for Instance

Source§

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

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

impl Deref for Instance

Source§

type Target = Instance

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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.