Skip to main content

PassTimestampCapture

Struct PassTimestampCapture 

Source
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>

Source

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.

Source

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.

Source

pub const fn queries(&self) -> Option<&Q>

Optional query resource; absent for metadata-only capture.

Source

pub const fn query_range(&self) -> Range<u32> ⓘ

Contiguous written query slots. Skip resolve when this range is empty.

Source

pub const fn query_capacity(&self) -> u32

Number of allocated query slots, including unused bounded capacity.

Source

pub fn records(&self) -> &[PassTimestampRecord]

Records retained in command recording order.

Source

pub const fn passes_seen(&self) -> u64

Total actual passes, including every omitted occurrence after overflow.

Source

pub fn incomplete(&self) -> Option<TimestampCaptureIncomplete>

Explicitly reports overflow; retained records must not imply completeness.

Source

pub const fn set_sample(&mut self, sample: Option<u32>)

Sets identity for subsequent pass occurrences; does not alter prior records.

Source

pub fn reset(&mut self)

Clears metadata without reallocating. Call only after the preceding GPU submission has completed and its queries have been decoded.

Source

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.

Trait Implementations§

Source§

impl<Q: Debug> Debug for PassTimestampCapture<Q>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.