wgpu/api/command_buffer.rs
1use crate::*;
2
3/// Handle to a command buffer on the GPU.
4///
5/// A `CommandBuffer` represents a complete sequence of commands that may be submitted to a command
6/// queue with [`Queue::submit`]. A `CommandBuffer` is obtained by recording a series of commands to
7/// a [`CommandEncoder`] and then calling [`CommandEncoder::finish`].
8///
9/// Corresponds to [WebGPU `GPUCommandBuffer`](https://gpuweb.github.io/gpuweb/#command-buffer).
10#[derive(Debug)]
11pub struct CommandBuffer {
12 pub(crate) buffer: dispatch::DispatchCommandBuffer,
13}
14#[cfg(send_sync)]
15static_assertions::assert_impl_all!(CommandBuffer: Send, Sync);