[][src]Struct rendy_command::CommandBuffer

pub struct CommandBuffer<B: Backend, C, S, L = PrimaryLevel, R = NoIndividualReset> { /* fields omitted */ }

Command buffer wrapper. This wrapper defines state with usage, level and ability to be individually reset at type level. This way many methods become safe.

Methods

impl<B, C, U, L, R> CommandBuffer<B, C, RecordingState<U>, L, R> where
    B: Backend,
    C: Capability,
    L: Level
[src]

pub fn encoder(&mut self) -> Encoder<B, C, L>[src]

Get encoder that will encode commands into this command buffer.

impl<B, C, U, R> CommandBuffer<B, C, RecordingState<U, RenderPassContinue>, SecondaryLevel, R> where
    B: Backend,
    C: Supports<Graphics>, 
[src]

pub fn render_pass_encoder(&mut self) -> RenderPassEncoder<B>[src]

Get encoder that will encode render-pass commands into this command buffer.

impl<B, C, P, L, R> CommandBuffer<B, C, ExecutableState<OneShot, P>, L, R> where
    B: Backend,
    P: Copy,
    L: Copy
[src]

pub fn submit_once(
    self
) -> (Submit<B, NoSimultaneousUse, L, P>, CommandBuffer<B, C, PendingState<InvalidState>, L, R>)
[src]

Produce Submit object that can be used to populate submission.

impl<B, C, S, L, P, R> CommandBuffer<B, C, ExecutableState<MultiShot<S>, P>, L, R> where
    B: Backend,
    P: Copy,
    S: Copy,
    L: Copy
[src]

pub fn submit(
    self
) -> (Submit<B, S, L, P>, CommandBuffer<B, C, PendingState<ExecutableState<MultiShot<S>, P>>, L, R>)
[src]

Produce Submit object that can be used to populate submission.

impl<B, C, S, L, R> CommandBuffer<B, C, S, L, R> where
    B: Backend
[src]

pub fn family_id(&self) -> FamilyId[src]

Get owner id.

pub fn assert_family_owner(&self, family: &Family<B, C>)[src]

Assert specified family is owner.

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

Assert specified device is owner.

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

Assert specified instance is owner.

impl<B, C, S, L, R> CommandBuffer<B, C, S, L, R> where
    B: Backend
[src]

pub unsafe fn change_state<U>(
    self,
    f: impl FnOnce(S) -> U
) -> CommandBuffer<B, C, U, L, R>
[src]

Change state of the command buffer.

Safety

  • This method must be used only to reflect state changed due to raw handle usage.

pub fn capability(&self) -> C where
    C: Capability
[src]

Get buffers capability.

pub fn family(&self) -> FamilyId[src]

Get buffers family.

pub fn with_queue_type(self) -> CommandBuffer<B, QueueType, S, L, R> where
    C: Capability
[src]

Convert capability level.

pub fn with_capability<U>(self) -> Result<CommandBuffer<B, U, S, L, R>, Self> where
    C: Supports<U>, 
[src]

Convert capability level.

impl<B, C, L, R> CommandBuffer<B, C, InitialState, L, R> where
    B: Backend
[src]

pub fn begin<'a, U, P>(
    self,
    usage: U,
    info: impl BeginInfo<'a, B, L, PassRelation = P>
) -> CommandBuffer<B, C, RecordingState<U, P>, L, R> where
    U: Usage,
    P: RenderPassRelation<L>, 
[src]

Begin recording command buffer.

Parameters

usage - specifies usage of the command buffer. Possible types are OneShot, MultiShot.

impl<'a, B, C, U, P, L, R> CommandBuffer<B, C, RecordingState<U, P>, L, R> where
    B: Backend
[src]

pub fn finish(self) -> CommandBuffer<B, C, ExecutableState<U, P>, L, R>[src]

Finish recording command buffer.

impl<B, C, N, L, R> CommandBuffer<B, C, PendingState<N>, L, R> where
    B: Backend
[src]

pub unsafe fn mark_complete(self) -> CommandBuffer<B, C, N, L, R>[src]

Mark command buffer as complete.

Safety

None of Submit instances created from this CommandBuffer are alive.

If this is PrimaryLevel buffer then for each command queue where Submit instance (created from this CommandBuffer) was submitted at least one Fence submitted within same Submission or later in unset state was set.

If this is Secondary buffer then all primary command buffers where Submit instance (created from this CommandBuffer) was submitted must be complete.

impl<B, C, S, L> CommandBuffer<B, C, S, L, IndividualReset> where
    B: Backend,
    S: Resettable
[src]

pub fn reset(self) -> CommandBuffer<B, C, InitialState, L, IndividualReset>[src]

Reset command buffer.

impl<B, C, S, L> CommandBuffer<B, C, S, L> where
    B: Backend,
    S: Resettable
[src]

pub unsafe fn mark_reset(self) -> CommandBuffer<B, C, InitialState, L>[src]

Mark command buffer as reset.

Safety

  • This function must be used only to reflect command buffer being reset implicitly. For instance:
  • CommandPool::reset on pool from which the command buffer was allocated.
  • Raw handle usage.

impl<B, C, S, L, R> CommandBuffer<B, C, S, L, R> where
    B: Backend,
    S: Resettable
[src]

pub fn into_raw(self) -> B::CommandBuffer[src]

Dispose of command buffer wrapper releasing raw comman buffer value. This function is intended to be used to deallocate command buffer.

pub fn raw(&mut self) -> &mut B::CommandBuffer[src]

Get raw command buffer handle.

Trait Implementations

impl<B, C, S, L, R> Sync for CommandBuffer<B, C, S, L, R> where
    B: Backend,
    B::CommandBuffer: Sync,
    C: Sync,
    S: Sync,
    L: Sync,
    R: Sync,
    FamilyId: Sync,
    Relevant: Sync
[src]

impl<B, C, S, L, R> Send for CommandBuffer<B, C, S, L, R> where
    B: Backend,
    B::CommandBuffer: Send,
    C: Send,
    S: Send,
    L: Send,
    R: Send,
    FamilyId: Send,
    Relevant: Send
[src]

impl<B: Backend, C, S, L, R> Debug for CommandBuffer<B, C, S, L, R> where
    C: Debug,
    S: Debug,
    L: Debug,
    R: Debug
[src]

Auto Trait Implementations

impl<B, C, S, L, R> Unpin for CommandBuffer<B, C, S, L, R> where
    C: Unpin,
    L: Unpin,
    R: Unpin,
    S: Unpin,
    <B as Backend>::CommandBuffer: Unpin

impl<B, C, S, L, R> UnwindSafe for CommandBuffer<B, C, S, L, R> where
    C: UnwindSafe,
    L: UnwindSafe,
    R: UnwindSafe,
    S: UnwindSafe,
    <B as Backend>::CommandBuffer: RefUnwindSafe

impl<B, C, S, L, R> RefUnwindSafe for CommandBuffer<B, C, S, L, R> where
    C: RefUnwindSafe,
    L: RefUnwindSafe,
    R: RefUnwindSafe,
    S: RefUnwindSafe,
    <B as Backend>::CommandBuffer: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Supports<T> for T[src]

impl<T> SetParameter for T[src]

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 
[src]

Sets value as a parameter of self.

impl<T> Erased for T[src]