Struct vulkano::command_buffer::synced::SyncCommandBuffer
source · [−]pub struct SyncCommandBuffer { /* private fields */ }
Expand description
Command buffer built from a SyncCommandBufferBuilder
that provides utilities to handle
synchronization.
Implementations
sourceimpl SyncCommandBuffer
impl SyncCommandBuffer
sourcepub fn lock_submit(
&self,
future: &dyn GpuFuture,
queue: &Queue
) -> Result<(), CommandBufferExecError>
pub fn lock_submit(
&self,
future: &dyn GpuFuture,
queue: &Queue
) -> Result<(), CommandBufferExecError>
Tries to lock the resources used by the command buffer.
Note: You should call this in the implementation of the
CommandBuffer
trait.
sourcepub unsafe fn unlock(&self)
pub unsafe fn unlock(&self)
Unlocks the resources used by the command buffer.
Note: You should call this in the implementation of the
CommandBuffer
trait.
Safety
The command buffer must have been successfully locked with lock_submit()
.
sourcepub fn check_buffer_access(
&self,
buffer: &dyn BufferAccess,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlags)>, AccessCheckError>
pub fn check_buffer_access(
&self,
buffer: &dyn BufferAccess,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlags)>, AccessCheckError>
Checks whether this command buffer has access to a buffer.
Note: Suitable when implementing the
CommandBuffer
trait.
sourcepub fn check_image_access(
&self,
image: &dyn ImageAccess,
layout: ImageLayout,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlags)>, AccessCheckError>
pub fn check_image_access(
&self,
image: &dyn ImageAccess,
layout: ImageLayout,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlags)>, AccessCheckError>
Checks whether this command buffer has access to an image.
Note: Suitable when implementing the
CommandBuffer
trait.
pub fn num_buffers(&self) -> usize
pub fn buffer(
&self,
index: usize
) -> Option<(&Arc<dyn BufferAccess>, PipelineMemoryAccess)>
pub fn num_images(&self) -> usize
pub fn image(
&self,
index: usize
) -> Option<(&Arc<dyn ImageAccess>, PipelineMemoryAccess, ImageLayout, ImageLayout, ImageUninitializedSafe)>
Trait Implementations
sourceimpl AsRef<UnsafeCommandBuffer> for SyncCommandBuffer
impl AsRef<UnsafeCommandBuffer> for SyncCommandBuffer
sourcefn as_ref(&self) -> &UnsafeCommandBuffer
fn as_ref(&self) -> &UnsafeCommandBuffer
Performs the conversion.
sourceimpl DeviceOwned for SyncCommandBuffer
impl DeviceOwned for SyncCommandBuffer
Auto Trait Implementations
impl !RefUnwindSafe for SyncCommandBuffer
impl Send for SyncCommandBuffer
impl Sync for SyncCommandBuffer
impl Unpin for SyncCommandBuffer
impl !UnwindSafe for SyncCommandBuffer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more