[−][src]Struct rendy_command::CommandBuffer
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]
B: Backend,
C: Capability,
L: Level,
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]
B: Backend,
C: Supports<Graphics>,
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]
B: Backend,
P: Copy,
L: Copy,
pub fn submit_once(
self
) -> (Submit<B, NoSimultaneousUse, L, P>, CommandBuffer<B, C, PendingState<InvalidState>, L, R>)
[src]
self
) -> (Submit<B, NoSimultaneousUse, L, P>, CommandBuffer<B, C, PendingState<InvalidState>, L, R>)
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]
B: Backend,
P: Copy,
S: Copy,
L: Copy,
pub fn submit(
self
) -> (Submit<B, S, L, P>, CommandBuffer<B, C, PendingState<ExecutableState<MultiShot<S>, P>>, L, R>)
[src]
self
) -> (Submit<B, S, L, P>, CommandBuffer<B, C, PendingState<ExecutableState<MultiShot<S>, P>>, L, R>)
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]
B: Backend,
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]
B: Backend,
pub unsafe fn change_state<U>(
self,
f: impl FnOnce(S) -> U
) -> CommandBuffer<B, C, U, L, R>
[src]
self,
f: impl FnOnce(S) -> U
) -> CommandBuffer<B, C, U, L, R>
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]
C: Capability,
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]
C: Capability,
Convert capability level.
pub fn with_capability<U>(self) -> Result<CommandBuffer<B, U, S, L, R>, Self> where
C: Supports<U>,
[src]
C: Supports<U>,
Convert capability level.
impl<B, C, L, R> CommandBuffer<B, C, InitialState, L, R> where
B: Backend,
[src]
B: Backend,
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]
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>,
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]
B: Backend,
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]
B: Backend,
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]
B: Backend,
S: Resettable,
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]
B: Backend,
S: Resettable,
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]
B: Backend,
S: Resettable,
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> 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]
B: Backend,
B::CommandBuffer: Send,
C: Send,
S: Send,
L: Send,
R: Send,
FamilyId: Send,
Relevant: Send,
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]
B: Backend,
B::CommandBuffer: Sync,
C: Sync,
S: Sync,
L: Sync,
R: Sync,
FamilyId: Sync,
Relevant: Sync,
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]
C: Debug,
S: Debug,
L: Debug,
R: Debug,
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,
C: Unpin,
L: Unpin,
R: Unpin,
S: 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,
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,
C: RefUnwindSafe,
L: RefUnwindSafe,
R: RefUnwindSafe,
S: RefUnwindSafe,
<B as Backend>::CommandBuffer: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,