pub struct LodUploadSession { /* private fields */ }Expand description
Bounded lease/upload admission state.
Implementations§
Source§impl LodUploadSession
impl LodUploadSession
Sourcepub fn try_new(budgets: LodBudgets) -> LodResult<Self>
pub fn try_new(budgets: LodBudgets) -> LodResult<Self>
Creates an empty upload session using the exact records memory tracker.
Sourcepub fn begin_frame(&self, generation: u64) -> LodResult<()>
pub fn begin_frame(&self, generation: u64) -> LodResult<()>
Starts a new frame/generation and resets only the per-frame upload ledger.
Sourcepub fn try_lease(
&self,
node: NodeId,
point_count: u64,
host_bytes: u64,
upload_bytes: u64,
cancellation: CancellationToken,
) -> LodResult<HostChunkLease>
pub fn try_lease( &self, node: NodeId, point_count: u64, host_bytes: u64, upload_bytes: u64, cancellation: CancellationToken, ) -> LodResult<HostChunkLease>
Reserves host memory, in-flight capacity, and this frame’s upload bytes.
Sourcepub fn complete_upload(
&self,
lease: HostChunkLease,
gpu_bytes: u64,
cache: &mut LodGpuCache,
protected: &BTreeSet<NodeId>,
) -> LodResult<LodUploadReceipt>
pub fn complete_upload( &self, lease: HostChunkLease, gpu_bytes: u64, cache: &mut LodGpuCache, protected: &BTreeSet<NodeId>, ) -> LodResult<LodUploadReceipt>
Records a caller-completed upload and admits it to the GPU cache.
Sourcepub fn host_memory(&self) -> MemorySnapshot
pub fn host_memory(&self) -> MemorySnapshot
Current and peak host lease bytes.
Trait Implementations§
Source§impl Clone for LodUploadSession
impl Clone for LodUploadSession
Source§fn clone(&self) -> LodUploadSession
fn clone(&self) -> LodUploadSession
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 LodUploadSession
impl RefUnwindSafe for LodUploadSession
impl Send for LodUploadSession
impl Sync for LodUploadSession
impl Unpin for LodUploadSession
impl UnsafeUnpin for LodUploadSession
impl UnwindSafe for LodUploadSession
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