Struct DeviceHandle
pub struct DeviceHandle {
pub adapter: Adapter,
pub device: Device,
pub queue: Queue,
/* private fields */
}Expand description
An adapter and the device opened on it.
vello’s own DeviceHandle keeps adapter private, which is the only reason
this type exists rather than being reused.
Fields§
§adapter: Adapter§device: Device§queue: QueueImplementations§
§impl DeviceHandle
impl DeviceHandle
pub fn loss_monitor(&self) -> DeviceLossMonitor
pub fn loss_monitor(&self) -> DeviceLossMonitor
Observe loss without replacing the context-owned callback.
pub fn adapter(&self) -> &Adapter
pub fn adapter(&self) -> &Adapter
A method as well as a field, because vello’s handle offers one and call sites were written against it.
pub fn open_peer(&self) -> Option<(Device, Queue)>
pub fn open_peer(&self) -> Option<(Device, Queue)>
The same driver’s device on a fresh instance of this adapter’s backend, with this device’s features and limits. Blocks while the device opens.
Not a second device on this adapter: Mesa’s CPU Vulkan driver compiles shaders for every device of one physical device one at a time, so work meant to run beside this device’s needs a physical device of its own.
Auto Trait Implementations§
impl Freeze for DeviceHandle
impl !RefUnwindSafe for DeviceHandle
impl Send for DeviceHandle
impl Sync for DeviceHandle
impl Unpin for DeviceHandle
impl UnsafeUnpin for DeviceHandle
impl !UnwindSafe for DeviceHandle
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
Mutably borrows from an owned value. Read more
§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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more