rendy_command

Struct Fence

Source
pub struct Fence<B: Backend> { /* private fields */ }
Expand description

Fence wrapper.

Implementations§

Source§

impl<B> Fence<B>
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> Fence<B>
where B: Backend,

Source

pub fn new(device: &Device<B>, signaled: bool) -> Result<Self, OutOfMemory>

Create new fence in signaled or unsignaled state.

Source

pub fn is_submitted(&self) -> bool

Check if fence was submitted.

Source

pub fn is_signaled(&self) -> bool

Check if fence is signaled.

Source

pub fn is_unsignaled(&self) -> bool

Check if fence is unsignaled. It can be submitted as well.

Source

pub fn reset(&mut self, device: &Device<B>) -> Result<(), OutOfMemory>

Reset signaled fence. Panics if not signaled. Becomes unsigneled.

Source

pub unsafe fn mark_reset(&mut self)

Mark signaled fence as reset. Panics if not signaled. Becomes unsigneled. Fence must be reset using raw fence value.

Source

pub unsafe fn mark_signaled(&mut self) -> FenceEpoch

Mark fence as signaled. Panics if not submitted. Fence must be checked to be signaled using raw fence value.

Source

pub fn wait_signaled( &mut self, device: &Device<B>, timeout_ns: u64, ) -> Result<Option<FenceEpoch>, OomOrDeviceLost>

Wait for fence to become signaled. Panics if not submitted. Returns submission epoch on success.

Source

pub fn check_signaled( &mut self, device: &Device<B>, ) -> Result<Option<FenceEpoch>, DeviceLost>

Check if fence has became signaled. Panics if not submitted. Returns submission epoch on success.

Source

pub fn raw(&self) -> &B::Fence

Get raw fence reference. Use mark_* functions to reflect stage changes.

Source

pub fn epoch(&self) -> FenceEpoch

Get submission epoch. Panics if not submitted.

Source

pub fn into_inner(self) -> B::Fence

Unwrap raw fence value. Panics if submitted.

Trait Implementations§

Source§

impl<B: Debug + Backend> Debug for Fence<B>
where B::Fence: Debug,

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<B> Freeze for Fence<B>
where <B as Backend>::Fence: Freeze,

§

impl<B> RefUnwindSafe for Fence<B>
where <B as Backend>::Fence: RefUnwindSafe,

§

impl<B> Send for Fence<B>

§

impl<B> Sync for Fence<B>

§

impl<B> Unpin for Fence<B>
where <B as Backend>::Fence: Unpin,

§

impl<B> UnwindSafe for Fence<B>
where <B as Backend>::Fence: UnwindSafe,

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.