pub struct Recording<'p, P, Cb> {
pub cmd_buf: Cb,
pub resource_pool: &'p mut P,
/* private fields */
}Expand description
A Submission bound to a specific command buffer for explicit recording and submission.
Fields§
§cmd_buf: CbThe command buffer bound to this recording.
Note: This field is read-only.
resource_pool: &'p mut PThe pool used to allocate resources used during recording.
Note: This field may be mutated in between calls to record. The updated pool will be
used for future calls to record.
Implementations§
Source§impl<'p, P, Cb> Recording<'p, P, Cb>where
Cb: AsRef<CommandBuffer>,
impl<'p, P, Cb> Recording<'p, P, Cb>where
Cb: AsRef<CommandBuffer>,
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true when this submission contains no more commands to record.
Sourcepub fn resource<N>(&self, resource_node: N) -> &N::Resourcewhere
N: Node,
pub fn resource<N>(&self, resource_node: N) -> &N::Resourcewhere
N: Node,
Returns a borrow of the original Vulkan resource (buffer, image or acceleration structure) which the given node represents.
Sourcepub fn finish(self) -> Result<RecordedSubmission<Cb>, DriverError>
pub fn finish(self) -> Result<RecordedSubmission<Cb>, DriverError>
Finalizes recording into a recorded submission for a caller-owned command buffer.
Source§impl<'p, P, Cb> Recording<'p, P, Cb>
impl<'p, P, Cb> Recording<'p, P, Cb>
Sourcepub fn record<'s>(
&mut self,
selection: impl Into<RecordSelection<'s>>,
) -> Result<(), DriverError>
pub fn record<'s>( &mut self, selection: impl Into<RecordSelection<'s>>, ) -> Result<(), DriverError>
Records any remaining graph commands into this submission’s command buffer.
When selection is RecordSelection::Nodes, nodes are processed sequentially in the
provided slice order and each step mutates the remaining submission state.