Struct InstanceObject

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

Opaque handle to a instance object

Implementations§

Source§

impl InstanceObject

Source

pub fn new(info: &InstanceCreateInfo<'_>) -> Result<Self>

Available on crate feature Implements only.

Create a new Vulkan instance

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_INITIALIZATION_FAILED
  • VK_ERROR_LAYER_NOT_PRESENT
  • VK_ERROR_EXTENSION_NOT_PRESENT
  • VK_ERROR_INCOMPATIBLE_DRIVER
Source

pub const unsafe fn manage(handle: VkInstance) -> Self

Constructs from raw handle

§Safety

the handle must be valid and not freed

Source

pub const fn unmanage(self) -> VkInstance

Purges internal values (Drop will not be called for this resource)

Trait Implementations§

Source§

impl Drop for InstanceObject

Available on crate feature Implements only.
Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Instance for InstanceObject

Source§

fn extra_procedure(&self, name: &CStr) -> Option<PFN_vkVoidFunction>

👎Deprecated: do not use this directly(this does not provide caching!)
Available on crate feature Implements only.
Return a function pointer for a command
Source§

fn physical_device_count(&self) -> Result<u32>

Available on crate feature Implements only.
Counts the physical devices accessible to a Vulkan instance Read more
Source§

fn enumerate_physical_devices( &self, sink: &mut [VkPhysicalDevice], ) -> Result<u32>

Available on crate feature Implements only.
Enumerates the physical devices accessible to a Vulkan instance Read more
Source§

fn iter_physical_devices(&self) -> Result<IterPhysicalDevices<'_, Self>>

Available on crate features Implements and alloc only.
Lazyly enumerates the physical devices accessible to a Vulkan instance Read more
Source§

fn enumerate_physical_devices_alloc( &self, ) -> Result<Vec<PhysicalDeviceObject<&Self>>>

Available on crate features Implements and alloc only.
Enumerates the physical devices accessible to a Vulkan instance Read more
Source§

impl InstanceExtensions for InstanceObject

Source§

fn create_debug_report_callback_ext_fn( &self, ) -> PFN_vkCreateDebugReportCallbackEXT

Available on crate features Implements and VK_EXT_debug_report only.
Source§

fn destroy_debug_report_callback_ext_fn( &self, ) -> PFN_vkDestroyDebugReportCallbackEXT

Available on crate features Implements and VK_EXT_debug_report only.
Source§

fn debug_report_message_ext_fn(&self) -> PFN_vkDebugReportMessageEXT

Available on crate features Implements and VK_EXT_debug_report only.
Source§

fn create_debug_utils_messenger_ext_fn( &self, ) -> PFN_vkCreateDebugUtilsMessengerEXT

Available on crate features Implements and VK_EXT_debug_utils only.
Source§

fn destroy_debug_utils_messenger_ext_fn( &self, ) -> PFN_vkDestroyDebugUtilsMessengerEXT

Available on crate features Implements and VK_EXT_debug_utils only.
Source§

fn set_debug_utils_object_name_ext_fn(&self) -> PFN_vkSetDebugUtilsObjectNameEXT

Available on crate features Implements and VK_EXT_debug_utils only.
Source§

fn get_physical_device_external_fence_properties_khr_fn( &self, ) -> PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR

Available on crate features Implements and VK_KHR_external_fence_capabilities only.
Source§

fn get_randr_output_display_ext_fn(&self) -> PFN_vkGetRandROutputDisplayEXT

Available on crate features Implements and VK_EXT_acquire_xlib_display only.
Source§

fn acquire_xlib_display_ext_fn(&self) -> PFN_vkAcquireXlibDisplayEXT

Available on crate features Implements and VK_EXT_acquire_xlib_display only.
Source§

fn get_physical_device_surface_present_modes_2_ext_fn( &self, ) -> PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT

Available on crate features Implements and VK_EXT_full_screen_exclusive only.
Source§

fn get_physical_device_surface_capabilities_2_khr_fn( &self, ) -> PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR

Available on crate features Implements and VK_KHR_get_surface_capabilities2 only.
Source§

fn release_display_ext_fn(&self) -> PFN_vkReleaseDisplayEXT

Available on crate features Implements and VK_EXT_direct_mode_display only.
Source§

fn get_physical_device_multisample_properties_ext_fn( &self, ) -> PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT

Available on crate features Implements and VK_EXT_sample_locations only.
Source§

unsafe fn new_debug_report_callback_raw( &self, info: &DebugReportCallbackCreateInfo, allocation_callbacks: Option<&VkAllocationCallbacks>, ) -> Result<VkDebugReportCallbackEXT>

Available on crate features Implements and VK_EXT_debug_report only.
Register a debug report callback Read more
Source§

fn debug_message( &self, flags: VkDebugReportFlagsEXT, object_type: DebugReportObjectType, object: u64, location: usize, message_count: i32, layer_prefix: &CStr, message: &CStr, )

Available on crate features Implements and VK_EXT_debug_report only.
Inject its own messages into the debug stream
Source§

unsafe fn destroy_debug_report_callback_raw( &self, obj: VkDebugReportCallbackEXT, allocation_callbacks: Option<&VkAllocationCallbacks>, )

Available on crate features Implements and VK_EXT_debug_report only.
Destroy a debug report callback object Read more
Source§

unsafe fn new_debug_utils_messenger_raw( &self, info: &DebugUtilsMessengerCreateInfo, allocation_callbacks: Option<&VkAllocationCallbacks>, ) -> Result<VkDebugUtilsMessengerEXT>

Available on crate features Implements and VK_EXT_debug_utils only.
Create a debug messenger object Read more
Source§

unsafe fn destroy_debug_utils_messenger_raw( &self, obj: VkDebugUtilsMessengerEXT, allocation_callbacks: Option<&VkAllocationCallbacks>, )

Available on crate features Implements and VK_EXT_debug_utils only.
Destroy a debug messenger object Read more
Source§

impl VkHandle for InstanceObject

Source§

type Handle = VkInstance

Source§

fn native_ptr(&self) -> Self::Handle

Retrieve an underlying handle
Source§

fn as_transparent_ref(&self) -> VkHandleRef<'_, Self::Handle>

Source§

impl VkHandleMut for InstanceObject

Source§

fn native_ptr_mut(&mut self) -> Self::Handle

Retrieve an underlying mutable handle
Source§

fn as_transparent_ref_mut(&mut self) -> VkHandleRefMut<'_, Self::Handle>

Source§

impl VkObject for InstanceObject

Source§

impl Send for InstanceObject

Source§

impl Sync for InstanceObject

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, 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<T> VkHandleExt for T
where T: VkHandle,

Source§

fn eq_handle(&self, other: &Self) -> bool
where Self::Handle: VkRawHandle,

Checks the equality between vulkan objects by their handle value.