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
impl VulkanInstanceApi
Sourcepub fn new(instance: Arc<dyn IVulkanInstance>) -> Self
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.
Sourcepub fn instance(&self) -> &Arc<dyn IVulkanInstance> ⓘ
pub fn instance(&self) -> &Arc<dyn IVulkanInstance> ⓘ
The instance of the table.
Sourcepub fn create_debug_utils_messenger_ext(
&self,
instance: Instance,
create_info: &DebugUtilsMessengerCreateInfoEXT<'_>,
) -> Result<DebugUtilsMessengerEXT, Result>
pub fn create_debug_utils_messenger_ext( &self, instance: Instance, create_info: &DebugUtilsMessengerCreateInfoEXT<'_>, ) -> Result<DebugUtilsMessengerEXT, Result>
vkCreateDebugUtilsMessengerEXT.
Sourcepub fn enumerate_physical_devices(
&self,
instance: Instance,
) -> Result<Vec<PhysicalDevice>, Result>
pub fn enumerate_physical_devices( &self, instance: Instance, ) -> Result<Vec<PhysicalDevice>, Result>
vkEnumeratePhysicalDevices.
Sourcepub fn get_physical_device_properties(
&self,
physical_device: PhysicalDevice,
) -> PhysicalDeviceProperties
pub fn get_physical_device_properties( &self, physical_device: PhysicalDevice, ) -> PhysicalDeviceProperties
vkGetPhysicalDeviceProperties.
Sourcepub fn enumerate_device_extension_properties(
&self,
physical_device: PhysicalDevice,
) -> Result<Vec<ExtensionProperties>, Result>
pub fn enumerate_device_extension_properties( &self, physical_device: PhysicalDevice, ) -> Result<Vec<ExtensionProperties>, Result>
vkEnumerateDeviceExtensionProperties without a layer.
Sourcepub fn get_physical_device_surface_support_khr(
&self,
physical_device: PhysicalDevice,
queue_family_index: u32,
surface: SurfaceKHR,
) -> Result<bool, Result>
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.
Sourcepub fn get_physical_device_queue_family_properties(
&self,
physical_device: PhysicalDevice,
) -> Vec<QueueFamilyProperties>
pub fn get_physical_device_queue_family_properties( &self, physical_device: PhysicalDevice, ) -> Vec<QueueFamilyProperties>
vkGetPhysicalDeviceQueueFamilyProperties.
Sourcepub fn create_device(
&self,
physical_device: PhysicalDevice,
create_info: &DeviceCreateInfo<'_>,
) -> Result<Device, Result>
pub fn create_device( &self, physical_device: PhysicalDevice, create_info: &DeviceCreateInfo<'_>, ) -> Result<Device, Result>
vkCreateDevice.
Sourcepub fn destroy_device(&self, device: Device)
pub fn destroy_device(&self, device: Device)
vkDestroyDevice. The device and its objects must not be used
afterwards.
Sourcepub fn get_device_queue(
&self,
device: Device,
queue_family_index: u32,
queue_index: u32,
) -> Queue
pub fn get_device_queue( &self, device: Device, queue_family_index: u32, queue_index: u32, ) -> Queue
vkGetDeviceQueue.
Sourcepub fn get_device_proc_addr(&self, device: Device, name: &CStr) -> isize
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.
Sourcepub fn destroy_surface_khr(&self, instance: Instance, surface: SurfaceKHR)
pub fn destroy_surface_khr(&self, instance: Instance, surface: SurfaceKHR)
vkDestroySurfaceKHR. The surface must not be used afterwards.
Sourcepub fn get_physical_device_surface_formats_khr(
&self,
physical_device: PhysicalDevice,
surface: SurfaceKHR,
) -> Result<Vec<SurfaceFormatKHR>, Result>
pub fn get_physical_device_surface_formats_khr( &self, physical_device: PhysicalDevice, surface: SurfaceKHR, ) -> Result<Vec<SurfaceFormatKHR>, Result>
vkGetPhysicalDeviceSurfaceFormatsKHR.
Sourcepub fn get_physical_device_memory_properties(
&self,
physical_device: PhysicalDevice,
) -> PhysicalDeviceMemoryProperties
pub fn get_physical_device_memory_properties( &self, physical_device: PhysicalDevice, ) -> PhysicalDeviceMemoryProperties
vkGetPhysicalDeviceMemoryProperties.
Sourcepub fn get_physical_device_surface_capabilities_khr(
&self,
physical_device: PhysicalDevice,
surface: SurfaceKHR,
) -> Result<SurfaceCapabilitiesKHR, Result>
pub fn get_physical_device_surface_capabilities_khr( &self, physical_device: PhysicalDevice, surface: SurfaceKHR, ) -> Result<SurfaceCapabilitiesKHR, Result>
vkGetPhysicalDeviceSurfaceCapabilitiesKHR.
Sourcepub fn get_physical_device_surface_present_modes_khr(
&self,
physical_device: PhysicalDevice,
surface: SurfaceKHR,
) -> Result<Vec<PresentModeKHR>, Result>
pub fn get_physical_device_surface_present_modes_khr( &self, physical_device: PhysicalDevice, surface: SurfaceKHR, ) -> Result<Vec<PresentModeKHR>, Result>
vkGetPhysicalDeviceSurfacePresentModesKHR.
Sourcepub fn get_physical_device_properties2(
&self,
physical_device: PhysicalDevice,
properties: &mut PhysicalDeviceProperties2<'_>,
)
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§
impl !RefUnwindSafe for VulkanInstanceApi
impl !UnwindSafe for VulkanInstanceApi
impl Freeze for VulkanInstanceApi
impl Send for VulkanInstanceApi
impl Sync for VulkanInstanceApi
impl Unpin for VulkanInstanceApi
impl UnsafeUnpin for VulkanInstanceApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more