wgpu_core/command/
timestamp_writes.rs

1use std::sync::Arc;
2
3use crate::id;
4
5/// Describes the writing of timestamp values in a render or compute pass.
6#[derive(Clone, Debug, PartialEq, Eq)]
7#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
8pub struct PassTimestampWrites {
9    /// The query set to write the timestamps to.
10    pub query_set: id::QuerySetId,
11    /// The index of the query set at which a start timestamp of this pass is written, if any.
12    pub beginning_of_pass_write_index: Option<u32>,
13    /// The index of the query set at which an end timestamp of this pass is written, if any.
14    pub end_of_pass_write_index: Option<u32>,
15}
16
17/// Describes the writing of timestamp values in a render or compute pass with the query set resolved.
18pub struct ArcPassTimestampWrites {
19    /// The query set to write the timestamps to.
20    pub query_set: Arc<crate::resource::QuerySet>,
21    /// The index of the query set at which a start timestamp of this pass is written, if any.
22    pub beginning_of_pass_write_index: Option<u32>,
23    /// The index of the query set at which an end timestamp of this pass is written, if any.
24    pub end_of_pass_write_index: Option<u32>,
25}