Struct sierra::PhysicalDevice
source · pub struct PhysicalDevice { /* private fields */ }
Expand description
Opaque value representing a device (software emulated of hardware). Can be used to fetch information about device, its support of the surface and create graphics device.
Implementations§
source§impl PhysicalDevice
impl PhysicalDevice
sourcepub fn info(&self) -> DeviceInfo
pub fn info(&self) -> DeviceInfo
Returns information about this device.
sourcepub fn create_device<Q>(
self,
features: &[Feature],
queues: Q
) -> Result<(Device, Q::Queues), CreateDeviceError<Q::Error>>where
Q: QueuesQuery,
pub fn create_device<Q>(
self,
features: &[Feature],
queues: Q
) -> Result<(Device, Q::Queues), CreateDeviceError<Q::Error>>where
Q: QueuesQuery,
Create graphics API device.
features
- device will enable specifeid features.
Only features listed in DeviceInfo
returned from self.info()
can
be specified here. Otherwise device creation will fail.
queues
- specifies QueuesQuery
object which will query device and
initialize command queues.
Returns initialized device and queues.
Type in which queues are returned depends on type of queues query,
it may be single queue, an array of queues, struct, anything.
Note. QueuesQuery
may be implemented by user, this trait is not
sealed.