pub struct ReusableCommandList { /* private fields */ }Expand description
A command list designed for repeated reset-and-re-record launch loops.
Mirrors the L0 §3.5.6 pattern: record once, submit, then zeCommandListReset
and re-record for the next iteration without re-allocating the list. The
reuse_count tracks how many times the underlying list
has been recycled, which a backend uses to amortise allocation cost.
Implementations§
Source§impl ReusableCommandList
impl ReusableCommandList
Sourcepub fn recorder_mut(&mut self) -> &mut CommandListRecorder
pub fn recorder_mut(&mut self) -> &mut CommandListRecorder
Mutable access to the underlying recorder for the current iteration.
Sourcepub fn recorder(&self) -> &CommandListRecorder
pub fn recorder(&self) -> &CommandListRecorder
Shared access to the underlying recorder.
Sourcepub fn reuse_count(&self) -> u64
pub fn reuse_count(&self) -> u64
How many times the list has been reset for reuse.
Sourcepub fn recycle(&mut self) -> LevelZeroResult<()>
pub fn recycle(&mut self) -> LevelZeroResult<()>
Reset for the next iteration, incrementing the reuse counter.
Returns LevelZeroError::CommandListError if the list was never
closed (resetting an open recording would lose un-submitted work).
Trait Implementations§
Source§impl Clone for ReusableCommandList
impl Clone for ReusableCommandList
Source§fn clone(&self) -> ReusableCommandList
fn clone(&self) -> ReusableCommandList
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReusableCommandList
impl RefUnwindSafe for ReusableCommandList
impl Send for ReusableCommandList
impl Sync for ReusableCommandList
impl Unpin for ReusableCommandList
impl UnsafeUnpin for ReusableCommandList
impl UnwindSafe for ReusableCommandList
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more