pub struct TimestampNormalizer {
state: Option<InternalState>,
}
Expand description
Normalizes GPU timestamps to have a consistent 1GHz period. See module documentation for more information.
Fields§
§state: Option<InternalState>
Implementations§
Source§impl TimestampNormalizer
impl TimestampNormalizer
Sourcepub fn new(
device: &Device,
timestamp_period: f32,
) -> Result<Self, TimestampNormalizerInitError>
pub fn new( device: &Device, timestamp_period: f32, ) -> Result<Self, TimestampNormalizerInitError>
Creates a new timestamp normalizer.
If the device cannot support automatic timestamp normalization, this will return a normalizer that does nothing.
§Errors
If any resources are invalid, this will return an error.
pub fn create_normalization_bind_group( &self, device: &Device, buffer: &dyn DynBuffer, buffer_label: Option<&str>, buffer_size: u64, buffer_usages: BufferUsages, ) -> Result<TimestampNormalizationBindGroup, DeviceError>
pub fn normalize( &self, snatch_guard: &SnatchGuard<'_>, encoder: &mut dyn DynCommandEncoder, tracker: &mut BufferTracker, bind_group: &TimestampNormalizationBindGroup, buffer: &Arc<Buffer>, buffer_offset_bytes: u64, total_timestamps: u32, )
pub fn dispose(self, device: &dyn DynDevice)
pub fn enabled(&self) -> bool
Auto Trait Implementations§
impl Freeze for TimestampNormalizer
impl !RefUnwindSafe for TimestampNormalizer
impl Send for TimestampNormalizer
impl Sync for TimestampNormalizer
impl Unpin for TimestampNormalizer
impl !UnwindSafe for TimestampNormalizer
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