pub struct PassTimestampCapture<Q> { /* private fields */ }Expand description
Reusable storage and query ownership for one submission’s actual passes.
Implementations§
Source§impl<Q> PassTimestampCapture<Q>
impl<Q> PassTimestampCapture<Q>
Sourcepub fn new<D: Device<QuerySet = Q>>(
device: &D,
max_passes: u32,
) -> Result<Self, TimestampCaptureError>
pub fn new<D: Device<QuerySet = Q>>( device: &D, max_passes: u32, ) -> Result<Self, TimestampCaptureError>
Allocates the query set and all metadata storage outside command recording.
§Errors
Returns typed unsupported, capacity, or backend allocation failures.
Sourcepub fn metadata_only(max_passes: u32) -> Result<Self, TimestampCaptureError>
pub fn metadata_only(max_passes: u32) -> Result<Self, TimestampCaptureError>
Allocates only bounded metadata for a device without timestamp queries. No query writes or synthetic timing values are produced.
§Errors
Returns a capacity error when the requested bound is invalid.
Sourcepub const fn queries(&self) -> Option<&Q>
pub const fn queries(&self) -> Option<&Q>
Optional query resource; absent for metadata-only capture.
Sourcepub const fn query_range(&self) -> Range<u32> ⓘ
pub const fn query_range(&self) -> Range<u32> ⓘ
Contiguous written query slots. Skip resolve when this range is empty.
Sourcepub const fn query_capacity(&self) -> u32
pub const fn query_capacity(&self) -> u32
Number of allocated query slots, including unused bounded capacity.
Sourcepub fn records(&self) -> &[PassTimestampRecord]
pub fn records(&self) -> &[PassTimestampRecord]
Records retained in command recording order.
Sourcepub const fn passes_seen(&self) -> u64
pub const fn passes_seen(&self) -> u64
Total actual passes, including every omitted occurrence after overflow.
Sourcepub fn incomplete(&self) -> Option<TimestampCaptureIncomplete>
pub fn incomplete(&self) -> Option<TimestampCaptureIncomplete>
Explicitly reports overflow; retained records must not imply completeness.
Sourcepub const fn set_sample(&mut self, sample: Option<u32>)
pub const fn set_sample(&mut self, sample: Option<u32>)
Sets identity for subsequent pass occurrences; does not alter prior records.
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Clears metadata without reallocating. Call only after the preceding GPU submission has completed and its queries have been decoded.
Sourcepub fn record_pass(
&mut self,
label: &'static str,
kind: TimestampPassKind,
descriptor_has_timestamps: bool,
) -> Option<TimestampQueryPair>
pub fn record_pass( &mut self, label: &'static str, kind: TimestampPassKind, descriptor_has_timestamps: bool, ) -> Option<TimestampQueryPair>
Backend hook at pass creation. Descriptor-authored timestamps are never replaced, and no query is reused if the bounded capacity is exhausted.