Trait vulkano::command_buffer::CommandBuffer [−][src]
Required methods
fn inner(&self) -> &UnsafeCommandBuffer
[src]
Returns the underlying UnsafeCommandBuffer
of this command buffer.
fn lock_submit(
&self,
future: &dyn GpuFuture,
queue: &Queue
) -> Result<(), CommandBufferExecError>
[src]
&self,
future: &dyn GpuFuture,
queue: &Queue
) -> Result<(), CommandBufferExecError>
Checks whether this command buffer is allowed to be submitted after the future
and on
the given queue, and if so locks it.
If you call this function, then you should call unlock
afterwards.
fn lock_record(&self) -> Result<(), CommandBufferExecError>
[src]
Checks whether this command buffer is allowed to be recorded to a command buffer, and if so locks it.
If you call this function, then you should call unlock
afterwards.
unsafe fn unlock(&self)
[src]
Unlocks the command buffer. Should be called once for each call to lock_submit
.
Safety
Must not be called if you haven’t called lock_submit
or lock_record
before.
fn check_buffer_access(
&self,
buffer: &dyn BufferAccess,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
[src]
&self,
buffer: &dyn BufferAccess,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
fn check_image_access(
&self,
image: &dyn ImageAccess,
layout: ImageLayout,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
[src]
&self,
image: &dyn ImageAccess,
layout: ImageLayout,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
fn kind(&self) -> Kind<&dyn RenderPassAbstract, &dyn FramebufferAbstract>
[src]
Returns a Kind
value describing the command buffer.
fn num_buffers(&self) -> usize
[src]
Returns the number of buffers accessed by this command buffer.
fn buffer(
&self,
index: usize
) -> Option<(&dyn BufferAccess, PipelineMemoryAccess)>
[src]
&self,
index: usize
) -> Option<(&dyn BufferAccess, PipelineMemoryAccess)>
Returns the index
th buffer of this command buffer, or None
if out of range.
The valid range is between 0 and num_buffers()
.
fn num_images(&self) -> usize
[src]
Returns the number of images accessed by this command buffer.
fn image(
&self,
index: usize
) -> Option<(&dyn ImageAccess, PipelineMemoryAccess, ImageLayout, ImageLayout)>
[src]
&self,
index: usize
) -> Option<(&dyn ImageAccess, PipelineMemoryAccess, ImageLayout, ImageLayout)>
Returns the index
th image of this command buffer, or None
if out of range.
The valid range is between 0 and num_images()
.
Provided methods
fn execute(
self,
queue: Arc<Queue>
) -> Result<CommandBufferExecFuture<NowFuture, Self>, CommandBufferExecError> where
Self: Sized + 'static,
[src]
self,
queue: Arc<Queue>
) -> Result<CommandBufferExecFuture<NowFuture, Self>, CommandBufferExecError> where
Self: Sized + 'static,
Executes this command buffer on a queue.
This function returns an object that implements the GpuFuture
trait. See the
documentation of the sync
module for more information.
The command buffer is not actually executed until you call flush()
on the object.
You are encouraged to chain together as many futures as possible before calling flush()
,
and call .then_signal_future()
before doing so. Note however that once you called
execute()
there is no way to cancel the execution, even if you didn’t flush yet.
Note: In the future this function may return
-> impl GpuFuture
instead of a concrete type.
Note: This is just a shortcut for
execute_after(vulkano::sync::now(), queue)
.
Panic
Panics if the device of the command buffer is not the same as the device of the future.
fn execute_after<F>(
self,
future: F,
queue: Arc<Queue>
) -> Result<CommandBufferExecFuture<F, Self>, CommandBufferExecError> where
Self: Sized + 'static,
F: GpuFuture,
[src]
self,
future: F,
queue: Arc<Queue>
) -> Result<CommandBufferExecFuture<F, Self>, CommandBufferExecError> where
Self: Sized + 'static,
F: GpuFuture,
Executes the command buffer after an existing future.
This function returns an object that implements the GpuFuture
trait. See the
documentation of the sync
module for more information.
The command buffer is not actually executed until you call flush()
on the object.
You are encouraged to chain together as many futures as possible before calling flush()
,
and call .then_signal_future()
before doing so. Note however that once you called
execute()
there is no way to cancel the execution, even if you didn’t flush yet.
Note: In the future this function may return
-> impl GpuFuture
instead of a concrete type.
This function requires the 'static
lifetime to be on the command buffer. This is because
this function returns a CommandBufferExecFuture
whose job is to lock resources and keep
them alive while they are in use by the GPU. If 'static
wasn’t required, you could call
std::mem::forget
on that object and “unlock” these resources. For more information about
this problem, search the web for “rust thread scoped leakpocalypse”.
Panic
Panics if the device of the command buffer is not the same as the device of the future.
Implementors
impl<P> CommandBuffer for AutoCommandBuffer<P>
[src]
fn inner(&self) -> &UnsafeCommandBuffer
[src]
fn lock_submit(
&self,
future: &dyn GpuFuture,
queue: &Queue
) -> Result<(), CommandBufferExecError>
[src]
&self,
future: &dyn GpuFuture,
queue: &Queue
) -> Result<(), CommandBufferExecError>
fn lock_record(&self) -> Result<(), CommandBufferExecError>
[src]
unsafe fn unlock(&self)
[src]
fn check_buffer_access(
&self,
buffer: &dyn BufferAccess,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
[src]
&self,
buffer: &dyn BufferAccess,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
fn check_image_access(
&self,
image: &dyn ImageAccess,
layout: ImageLayout,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
[src]
&self,
image: &dyn ImageAccess,
layout: ImageLayout,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
fn kind(&self) -> Kind<&dyn RenderPassAbstract, &dyn FramebufferAbstract>
[src]
fn num_buffers(&self) -> usize
[src]
fn buffer(
&self,
index: usize
) -> Option<(&dyn BufferAccess, PipelineMemoryAccess)>
[src]
&self,
index: usize
) -> Option<(&dyn BufferAccess, PipelineMemoryAccess)>
fn num_images(&self) -> usize
[src]
fn image(
&self,
index: usize
) -> Option<(&dyn ImageAccess, PipelineMemoryAccess, ImageLayout, ImageLayout)>
[src]
&self,
index: usize
) -> Option<(&dyn ImageAccess, PipelineMemoryAccess, ImageLayout, ImageLayout)>
impl<T> CommandBuffer for T where
T: SafeDeref,
T::Target: CommandBuffer,
[src]
T: SafeDeref,
T::Target: CommandBuffer,
fn inner(&self) -> &UnsafeCommandBuffer
[src]
fn lock_submit(
&self,
future: &dyn GpuFuture,
queue: &Queue
) -> Result<(), CommandBufferExecError>
[src]
&self,
future: &dyn GpuFuture,
queue: &Queue
) -> Result<(), CommandBufferExecError>
fn lock_record(&self) -> Result<(), CommandBufferExecError>
[src]
unsafe fn unlock(&self)
[src]
fn check_buffer_access(
&self,
buffer: &dyn BufferAccess,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
[src]
&self,
buffer: &dyn BufferAccess,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
fn check_image_access(
&self,
image: &dyn ImageAccess,
layout: ImageLayout,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
[src]
&self,
image: &dyn ImageAccess,
layout: ImageLayout,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
fn kind(&self) -> Kind<&dyn RenderPassAbstract, &dyn FramebufferAbstract>
[src]
fn num_buffers(&self) -> usize
[src]
fn buffer(
&self,
index: usize
) -> Option<(&dyn BufferAccess, PipelineMemoryAccess)>
[src]
&self,
index: usize
) -> Option<(&dyn BufferAccess, PipelineMemoryAccess)>
fn num_images(&self) -> usize
[src]
fn image(
&self,
index: usize
) -> Option<(&dyn ImageAccess, PipelineMemoryAccess, ImageLayout, ImageLayout)>
[src]
&self,
index: usize
) -> Option<(&dyn ImageAccess, PipelineMemoryAccess, ImageLayout, ImageLayout)>