Struct screen_13::driver::device::DeviceInfo
source · #[non_exhaustive]pub struct DeviceInfo {
pub debug: bool,
pub select_physical_device: Box<SelectPhysicalDeviceFn>,
}
Expand description
Information used to create a Device
instance.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.debug: bool
Enables Vulkan validation layers.
This requires a Vulkan SDK installation and will cause validation errors to introduce panics as they happen.
NOTE: Consider turning OFF debug if you discover an unknown issue. Often the validation layers will throw an error before other layers can provide additional context such as the API dump info or other messages. You might find the “actual” issue is detailed in those subsequent details.
§Platform-specific
macOS: Has no effect.
select_physical_device: Box<SelectPhysicalDeviceFn>
Callback function used to select a PhysicalDevice
from the available devices. The
callback must return the index of the selected device.
Implementations§
source§impl DeviceInfo
impl DeviceInfo
sourcepub fn integrated_gpu(physical_devices: &[PhysicalDevice]) -> usize
pub fn integrated_gpu(physical_devices: &[PhysicalDevice]) -> usize
A builtin DeviceInfo::select_physical_device
function which prioritizes selection of
lower-power integrated GPU devices.
sourcepub fn discrete_gpu(physical_devices: &[PhysicalDevice]) -> usize
pub fn discrete_gpu(physical_devices: &[PhysicalDevice]) -> usize
A builtin DeviceInfo::select_physical_device
function which prioritizes selection of
higher-performance discrete GPU devices.
sourcepub fn to_builder(self) -> DeviceInfoBuilder
pub fn to_builder(self) -> DeviceInfoBuilder
Converts a DeviceInfo
into a DeviceInfoBuilder
.