pub struct CommandBuffer {
pub device: Device,
pub fence: Fence,
pub handle: CommandBuffer,
pub info: CommandBufferInfo,
/* private fields */
}Expand description
Represents a Vulkan command buffer to which some work has been submitted.
Fields§
§device: DeviceThe device which owns this command buffer resource.
Note: This field is read-only.
fence: FenceThe native Vulkan fence handle of this command buffer.
Note: This field is read-only.
handle: CommandBufferThe native Vulkan resource handle of this command buffer.
Note: This field is read-only.
info: CommandBufferInfoInformation used to create this object.
Implementations§
Source§impl CommandBuffer
impl CommandBuffer
Sourcepub fn create(
device: &Device,
info: CommandBufferInfo,
) -> Result<Self, DriverError>
pub fn create( device: &Device, info: CommandBufferInfo, ) -> Result<Self, DriverError>
Creates a command buffer allocation backed by a transient resettable command pool.
Sourcepub fn drop_after_executed(&mut self, x: impl Debug + Send + 'static)
pub fn drop_after_executed(&mut self, x: impl Debug + Send + 'static)
Drops an item after execution has been completed.
Sourcepub fn has_executed(&self) -> Result<bool, DriverError>
pub fn has_executed(&self) -> Result<bool, DriverError>
Returns true after the GPU has executed the previous submission to this command buffer.
See Self::wait_until_executed to block while checking.
Sourcepub fn wait_until_executed(&mut self) -> Result<(), DriverError>
pub fn wait_until_executed(&mut self) -> Result<(), DriverError>
Stalls by blocking the current thread until the GPU has executed the previous submission to this command buffer.
See Self::has_executed to check without blocking.