Trait vulkano::buffer::traits::TrackedBuffer
[−]
[src]
pub unsafe trait TrackedBuffer: Buffer { type CommandListState: Any + CommandListState<FinishedState=Self::FinishedState>; type FinishedState: CommandBufferState; fn initial_state(&self) -> Self::CommandListState; fn is_same_buffer<B>(&self, other: &B) -> bool where B: Buffer { ... } fn is_same_image<I>(&self, other: &I) -> bool where I: Image { ... } }
Extension trait for Buffer
. Types that implement this can be used in a StdCommandBuffer
.
Each buffer and image used in a StdCommandBuffer
have an associated state which is
represented by the CommandListState
associated type of this trait. You can make multiple
buffers or images share the same state by making is_same
return true.
Associated Types
type CommandListState: Any + CommandListState<FinishedState=Self::FinishedState>
State of the buffer in a list of commands.
The Any
bound is here for stupid reasons, sorry.
type FinishedState: CommandBufferState
State of the buffer in a finished list of commands.
Required Methods
fn initial_state(&self) -> Self::CommandListState
Returns the state of the buffer when it has not yet been used.
Provided Methods
fn is_same_buffer<B>(&self, other: &B) -> bool where B: Buffer
Returns true if TODO.
If is_same
returns true, then the type of CommandListState
must be the same as for the
other buffer. Otherwise a panic will occur.
fn is_same_image<I>(&self, other: &I) -> bool where I: Image
Returns true if TODO.
If is_same
returns true, then the type of CommandListState
must be the same as for the
other image. Otherwise a panic will occur.
Implementors
impl<T: ?Sized, A> TrackedBuffer for CpuAccessibleBuffer<T, A> where T: 'static + Send + Sync, A: MemoryPool
impl<B> TrackedBuffer for Arc<B> where B: TrackedBuffer, Arc<B>: Buffer