Skip to main content

VulkanInstanceApi

Struct VulkanInstanceApi 

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

The entry points of Vulkan that are found through an instance.

The handles given to a member have to be handles of the instance the table was made for (or of its physical devices and devices), which is what makes the calls sound; the members take typed handles, and the objects of this crate pass none but those they received from the same instance.

Implementations§

Source§

impl VulkanInstanceApi

Source

pub fn new(instance: Arc<dyn IVulkanInstance>) -> Self

Resolves the entry points of instance. One the instance does not have (the surface functions without VK_KHR_surface, for instance) is replaced by a function that stops the program when it is called.

Source

pub fn instance(&self) -> &Arc<dyn IVulkanInstance> ⓘ

The instance of the table.

Source

pub fn create_debug_utils_messenger_ext( &self, instance: Instance, create_info: &DebugUtilsMessengerCreateInfoEXT<'_>, ) -> Result<DebugUtilsMessengerEXT, Result>

vkCreateDebugUtilsMessengerEXT.

Source

pub fn enumerate_physical_devices( &self, instance: Instance, ) -> Result<Vec<PhysicalDevice>, Result>

vkEnumeratePhysicalDevices.

Source

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

vkGetPhysicalDeviceProperties.

Source

pub fn enumerate_device_extension_properties( &self, physical_device: PhysicalDevice, ) -> Result<Vec<ExtensionProperties>, Result>

vkEnumerateDeviceExtensionProperties without a layer.

Source

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

vkGetPhysicalDeviceSurfaceSupportKHR: whether the queue family can present to the surface.

Source

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

vkGetPhysicalDeviceQueueFamilyProperties.

Source

pub fn create_device( &self, physical_device: PhysicalDevice, create_info: &DeviceCreateInfo<'_>, ) -> Result<Device, Result>

vkCreateDevice.

Source

pub fn destroy_device(&self, device: Device)

vkDestroyDevice. The device and its objects must not be used afterwards.

Source

pub fn get_device_queue( &self, device: Device, queue_family_index: u32, queue_index: u32, ) -> Queue

vkGetDeviceQueue.

Source

pub fn get_device_proc_addr(&self, device: Device, name: &CStr) -> isize

vkGetDeviceProcAddr: the address of a device-level entry point, zero when the device does not have it.

Source

pub fn destroy_surface_khr(&self, instance: Instance, surface: SurfaceKHR)

vkDestroySurfaceKHR. The surface must not be used afterwards.

Source

pub fn get_physical_device_surface_formats_khr( &self, physical_device: PhysicalDevice, surface: SurfaceKHR, ) -> Result<Vec<SurfaceFormatKHR>, Result>

vkGetPhysicalDeviceSurfaceFormatsKHR.

Source

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

vkGetPhysicalDeviceMemoryProperties.

Source

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

vkGetPhysicalDeviceSurfaceCapabilitiesKHR.

Source

pub fn get_physical_device_surface_present_modes_khr( &self, physical_device: PhysicalDevice, surface: SurfaceKHR, ) -> Result<Vec<PresentModeKHR>, Result>

vkGetPhysicalDeviceSurfacePresentModesKHR.

Source

pub fn get_physical_device_properties2( &self, physical_device: PhysicalDevice, properties: &mut PhysicalDeviceProperties2<'_>, )

vkGetPhysicalDeviceProperties2: fills the structure and the structures chained to it.

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> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.