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
.
Trait Implementations§
source§impl Default for DeviceInfo
impl Default for DeviceInfo
source§impl From<DeviceInfoBuilder> for DeviceInfo
impl From<DeviceInfoBuilder> for DeviceInfo
source§fn from(info: DeviceInfoBuilder) -> Self
fn from(info: DeviceInfoBuilder) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for DeviceInfo
impl !Send for DeviceInfo
impl !Sync for DeviceInfo
impl Unpin for DeviceInfo
impl !UnwindSafe for DeviceInfo
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.