Struct wgpu_core::resource::TrackingData
source · pub(crate) struct TrackingData {
tracker_index: TrackerIndex,
tracker_indices: Arc<SharedTrackerIndexAllocator>,
}
Expand description
Information about the wgpu-core resource.
Each type representing a wgpu-core
resource, like Device
,
Buffer
, etc., contains a ResourceInfo
which contains
its latest submission index and label.
A resource may need to be retained for any of several reasons:
and any lifetime logic will be handled by Arc<Resource>
refcount
-
The user may hold a reference to it (via a
wgpu::Buffer
, say). -
Other resources may depend on it (a texture view’s backing texture, for example).
-
It may be used by commands sent to the GPU that have not yet finished execution.
Fields§
§tracker_index: TrackerIndex
§tracker_indices: Arc<SharedTrackerIndexAllocator>
Implementations§
source§impl TrackingData
impl TrackingData
pub(crate) fn new(tracker_indices: Arc<SharedTrackerIndexAllocator>) -> Self
pub(crate) fn tracker_index(&self) -> TrackerIndex
Trait Implementations§
source§impl Debug for TrackingData
impl Debug for TrackingData
Auto Trait Implementations§
impl Freeze for TrackingData
impl !RefUnwindSafe for TrackingData
impl Send for TrackingData
impl Sync for TrackingData
impl Unpin for TrackingData
impl !UnwindSafe for TrackingData
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