Struct ccthw::graphics::vulkan_api::OneTimeSubmitCommandBuffer
source · pub struct OneTimeSubmitCommandBuffer { /* private fields */ }
Expand description
A utility for managing a small command pool which runs synchronous commands.
Implementations§
source§impl OneTimeSubmitCommandBuffer
impl OneTimeSubmitCommandBuffer
sourcepub unsafe fn new(
render_device: Arc<RenderDevice>,
queue: Queue
) -> Result<Self, GraphicsError>
pub unsafe fn new( render_device: Arc<RenderDevice>, queue: Queue ) -> Result<Self, GraphicsError>
sourcepub unsafe fn command_buffer(&self) -> CommandBuffer
pub unsafe fn command_buffer(&self) -> CommandBuffer
Get the current command buffer.
Safety
Unsafe because:
- the caller must not hold the command buffer after submission
- the command buffer is always ready for commands, there is no need to call vkBeginCommandBuffer
- the command buffer never needs to be explicitly ended by vkEndCommandBuffer
sourcepub unsafe fn sync_submit_and_reset(&mut self) -> Result<(), GraphicsError>
pub unsafe fn sync_submit_and_reset(&mut self) -> Result<(), GraphicsError>
Submit the current command buffer and block the CPU until all commands complete on the GPU.
Safety
Unsafe because:
- the application is responsible for synchronizing access to any resources referenced by the commands as they execute.
Auto Trait Implementations§
impl RefUnwindSafe for OneTimeSubmitCommandBuffer
impl !Send for OneTimeSubmitCommandBuffer
impl !Sync for OneTimeSubmitCommandBuffer
impl Unpin for OneTimeSubmitCommandBuffer
impl UnwindSafe for OneTimeSubmitCommandBuffer
Blanket Implementations§
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.