Struct ccthw_ash_instance::LogicalDevice
source · pub struct LogicalDevice { /* private fields */ }
Expand description
The logical device and information about the backing physical device.
Basically everything done with Vulkan requires a logical device. This type helps with the creation of the logical device and keeps the relevant information about the underlying physical device at hand for debugging and referenc.
Implementations§
source§impl LogicalDevice
impl LogicalDevice
sourcepub fn physical_device(&self) -> &PhysicalDevice
pub fn physical_device(&self) -> &PhysicalDevice
Get the physical device being controlled by this logical device.
sourcepub fn active_physical_device_extensions(&self) -> &[String]
pub fn active_physical_device_extensions(&self) -> &[String]
Get all of the device extensions used when creating the device.
sourcepub unsafe fn new(
instance: &VulkanInstance,
physical_device: PhysicalDevice,
physical_device_extensions: &[String],
queue_family_infos: &[QueueFamilyInfo]
) -> InstanceResult<Self>
pub unsafe fn new( instance: &VulkanInstance, physical_device: PhysicalDevice, physical_device_extensions: &[String], queue_family_infos: &[QueueFamilyInfo] ) -> InstanceResult<Self>
Create a logical device for interfacing with a given physical device.
Params
instance
- the Vulkan instance which provides access to the physical device.physical_device
- the actual physical device which this logical device will control.physical_device_extensions
- the extentions to enable for the physical device.queue_family_infos
- a slice of structs which control how many device queues to create.
Safety
Unsafe because the logical device must be dropped before the instance used to create it.