From 05c0656fa4234ce43ddbc60bdfa04f03a4b5861e Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Sun, 14 Jul 2024 13:03:36 -0700 Subject: [PATCH] [core] Correct docs for `LifetimeTracker` and its `mapped` field. --- wgpu-core/src/device/life.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/wgpu-core/src/device/life.rs b/wgpu-core/src/device/life.rs index 4ef57e4d1..118e1498b 100644 --- a/wgpu-core/src/device/life.rs +++ b/wgpu-core/src/device/life.rs @@ -95,15 +95,14 @@ pub enum WaitIdleError { /// submission index. /// /// 3) `handle_mapping` drains `self.ready_to_map` and actually maps the -/// buffers, collecting a list of notification closures to call. But any -/// buffers that were dropped by the user get moved to -/// `self.free_resources`. +/// buffers, collecting a list of notification closures to call. /// /// Only calling `Global::buffer_map_async` clones a new `Arc` for the /// buffer. This new `Arc` is only dropped by `handle_mapping`. pub(crate) struct LifetimeTracker { - /// Resources that the user has requested be mapped, but which are used by - /// queue submissions still in flight. + /// Buffers for which a call to [`Buffer::map_async`] has succeeded, but + /// which haven't been examined by `triage_mapped` yet to decide when they + /// can be mapped. mapped: Vec>>, /// Resources used by queue submissions still in flight. One entry per