Skip to main content

AdaptiveFrameGovernor

Struct AdaptiveFrameGovernor 

Source
pub struct AdaptiveFrameGovernor { /* private fields */ }
Expand description

Closed-loop damped PI + asymmetric hysteresis frame-budget governor stabilizing FPS across 60/120/144/240/360/480Hz targets.

Implementations§

Source§

impl AdaptiveFrameGovernor

Damped PI + asymmetric hysteresis frame-time stabilization for AdaptiveFrameGovernor.

Source

pub fn for_target_hz(target_hz: f32) -> Self

Creates a closed-loop AdaptiveFrameGovernor targeting target_hz (30.0..=1000.0 Hz).

§Arguments
  • f32 - Desired display refresh rate in Hertz.
§Returns
  • Self - Initialized closed-loop frame governor.
Source

pub fn with_scale_bounds(self, min_scale: f32, max_scale: f32) -> Self

Configures custom TSR/DRS resolution scale bounds (min_scale, max_scale).

§Arguments
  • f32 - Minimum resolution scale (0.40..=1.0).
  • f32 - Maximum resolution scale (min_scale..=1.25).
§Returns
  • Self - Updated governor.
Source

pub fn record_frame( &mut self, frame_ms: f32, config: &mut RenderQualityConfig, ) -> FramePacingTelemetry3D

Observes the completed frame_ms duration, updates smoothed telemetry, and smoothly adjusts config to lock target FPS without oscillation.

§Arguments
  • f32 - Measured frame duration in milliseconds.
  • &mut RenderQualityConfig - Active quality configuration adjusted in-place when dynamic scaling is enabled.
§Returns
  • FramePacingTelemetry3D - Live pacing, utilization, and stability diagnostics.
Source§

impl AdaptiveFrameGovernor

Source

pub fn get_target_hz(&self) -> f32

Source

pub fn get_mut_target_hz(&mut self) -> &mut f32

Source

pub fn set_target_hz(&mut self, val: f32) -> &mut Self

Source

pub fn get_min_scale(&self) -> f32

Source

pub fn get_mut_min_scale(&mut self) -> &mut f32

Source

pub fn set_min_scale(&mut self, val: f32) -> &mut Self

Source

pub fn get_max_scale(&self) -> f32

Source

pub fn get_mut_max_scale(&mut self) -> &mut f32

Source

pub fn set_max_scale(&mut self, val: f32) -> &mut Self

Source

pub fn get_current_scale(&self) -> f32

Source

pub fn get_mut_current_scale(&mut self) -> &mut f32

Source

pub fn set_current_scale(&mut self, val: f32) -> &mut Self

Source

pub fn get_rt_stride_bias(&self) -> usize

Source

pub fn get_mut_rt_stride_bias(&mut self) -> &mut usize

Source

pub fn set_rt_stride_bias(&mut self, val: usize) -> &mut Self

Source

pub fn get_lod_bias(&self) -> f32

Source

pub fn get_mut_lod_bias(&mut self) -> &mut f32

Source

pub fn set_lod_bias(&mut self, val: f32) -> &mut Self

Source

pub fn get_ema_frame_ms(&self) -> f32

Source

pub fn get_mut_ema_frame_ms(&mut self) -> &mut f32

Source

pub fn set_ema_frame_ms(&mut self, val: f32) -> &mut Self

Source

pub fn get_ema_jitter_ms(&self) -> f32

Source

pub fn get_mut_ema_jitter_ms(&mut self) -> &mut f32

Source

pub fn set_ema_jitter_ms(&mut self, val: f32) -> &mut Self

Source

pub fn get_p99_est_ms(&self) -> f32

Source

pub fn get_mut_p99_est_ms(&mut self) -> &mut f32

Source

pub fn set_p99_est_ms(&mut self, val: f32) -> &mut Self

Source

pub fn get_last_frame_ms(&self) -> f32

Source

pub fn get_mut_last_frame_ms(&mut self) -> &mut f32

Source

pub fn set_last_frame_ms(&mut self, val: f32) -> &mut Self

Source

pub fn get_under_budget_streak(&self) -> u32

Source

pub fn get_mut_under_budget_streak(&mut self) -> &mut u32

Source

pub fn set_under_budget_streak(&mut self, val: u32) -> &mut Self

Source

pub fn get_over_budget_streak(&self) -> u32

Source

pub fn get_mut_over_budget_streak(&mut self) -> &mut u32

Source

pub fn set_over_budget_streak(&mut self, val: u32) -> &mut Self

Source

pub fn get_hysteresis_frames(&self) -> u32

Source

pub fn get_mut_hysteresis_frames(&mut self) -> &mut u32

Source

pub fn set_hysteresis_frames(&mut self, val: u32) -> &mut Self

Source

pub fn get_total_frames(&self) -> u64

Source

pub fn get_mut_total_frames(&mut self) -> &mut u64

Source

pub fn set_total_frames(&mut self, val: u64) -> &mut Self

Trait Implementations§

Source§

impl Clone for AdaptiveFrameGovernor

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for AdaptiveFrameGovernor

Source§

impl Debug for AdaptiveFrameGovernor

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for AdaptiveFrameGovernor

Default 60Hz AdaptiveFrameGovernor.

Source§

fn default() -> Self

Creates a 60Hz closed-loop frame pacing governor with [0.50, 1.00] TSR/DRS scale bounds.

§Returns
  • Self - Default frame pacing governor.
Source§

impl PartialEq for AdaptiveFrameGovernor

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for AdaptiveFrameGovernor

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.