rendy_command

Struct Family

Source
pub struct Family<B: Backend, C = QueueType> { /* private fields */ }
Expand description

Family of the command queues. Queues from one family can share resources and execute command buffers associated with the family. All queues of the family have same capabilities.

Implementations§

Source§

impl<B, C> Family<B, C>
where B: Backend,

Source

pub fn device_id(&self) -> DeviceId

Get owned id.

Source

pub fn assert_device_owner(&self, device: &Device<B>)

Assert specified device is owner.

Source

pub fn instance_id(&self) -> InstanceId

Get owned id.

Source

pub fn assert_instance_owner(&self, instance: &Instance<B>)

Assert specified instance is owner.

Source§

impl<B> Family<B, QueueType>
where B: Backend,

Source

pub unsafe fn from_device( queue_groups: &mut Vec<QueueGroup<B>>, id: FamilyId, count: usize, family: &impl QueueFamily, ) -> Self

Query queue family from device.

§Safety

This function shouldn’t be used more then once with the same parameters. Raw queue handle queried from device can make Family usage invalid. family must be one of the family indices used during device creation. properties must be the properties retuned for queue family from physical device.

Source§

impl<B, C> Family<B, C>
where B: Backend,

Source

pub fn id(&self) -> FamilyId

Get id of the family.

Source

pub fn queue(&self, index: usize) -> &Queue<B>

Get queue by index

Source

pub fn queue_mut(&mut self, index: usize) -> &mut Queue<B>

Get queue by index

Source

pub fn as_slice(&self) -> &[Queue<B>]

Get queues of the family.

Source

pub fn as_slice_mut(&mut self) -> &mut [Queue<B>]

Get queues of the family.

Source

pub fn create_pool<R>( &self, device: &Device<B>, ) -> Result<CommandPool<B, C, R>, OutOfMemory>
where R: Reset, C: Capability,

Create command pool associated with the family. Command buffers created from the pool could be submitted to the queues of the family.

Source

pub fn capability(&self) -> C
where C: Capability,

Get family capability.

Source

pub fn with_queue_type(self) -> Family<B, QueueType>
where C: Capability,

Convert capability from type-level to value-level.

Source

pub fn with_capability<U>(self) -> Result<Family<B, U>, Self>
where C: Supports<U>,

Convert capability into type-level one.

Trait Implementations§

Source§

impl<B: Debug + Backend, C: Debug> Debug for Family<B, C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<B, C> Freeze for Family<B, C>
where C: Freeze,

§

impl<B, C> RefUnwindSafe for Family<B, C>

§

impl<B, C> Send for Family<B, C>
where C: Send,

§

impl<B, C> Sync for Family<B, C>
where C: Sync,

§

impl<B, C> Unpin for Family<B, C>
where C: Unpin, <B as Backend>::CommandQueue: Unpin,

§

impl<B, C> UnwindSafe for Family<B, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.