ovrPerfStats

Struct ovrPerfStats 

Source
#[repr(C)]
pub struct ovrPerfStats { pub _align: [u32; 0], pub FrameStats: [ovrPerfStatsPerCompositorFrame; 5], pub FrameStatsCount: c_int, pub AnyFrameStatsDropped: ovrBool, pub AdaptiveGpuPerformanceScale: f32, pub AswIsAvailable: ovrBool, pub VisibleProcessId: ovrProcessId, }
Expand description

This is a complete descriptor of the performance stats provided by the SDK

FrameStatsCount will have a maximum value set by ovrMaxProvidedFrameStats If the application calls ovr_GetPerfStats at the native refresh rate of the HMD then FrameStatsCount will be 1. If the app’s workload happens to force ovr_GetPerfStats to be called at a lower rate, then FrameStatsCount will be 2 or more.

If the app does not want to miss any performance data for any frame, it needs to ensure that it is calling ovr_SubmitFrame and ovr_GetPerfStats at a rate that is at least: “HMD_refresh_rate / ovrMaxProvidedFrameStats”. On the Oculus Rift CV1 HMD, this will be equal to 18 times per second.

If the app calls ovr_SubmitFrame at a rate less than 18 fps, then when calling ovr_GetPerfStats, expect AnyFrameStatsDropped to become ovrTrue while FrameStatsCount is equal to ovrMaxProvidedFrameStats.

The performance entries will be ordered in reverse chronological order such that the first entry will be the most recent one.

AdaptiveGpuPerformanceScale is an edge-filtered value that a caller can use to adjust the graphics quality of the application to keep the GPU utilization in check. The value is calculated as: (desired_GPU_utilization / current_GPU_utilization) As such, when this value is 1.0, the GPU is doing the right amount of work for the app.

Lower values mean the app needs to pull back on the GPU utilization.

If the app is going to directly drive render-target resolution using this value, then be sure to take the square-root of the value before scaling the resolution with it.

Changing render target resolutions however is one of the many things an app can do increase or decrease the amount of GPU utilization.

Since AdaptiveGpuPerformanceScale is edge-filtered and does not change rapidly (i.e. reports non-1.0 values once every couple of seconds) the app can make the necessary adjustments and then keep watching the value to see if it has been satisfied.

see ovr_GetPerfStats, ovrPerfStatsPerCompositorFrame

Fields§

§_align: [u32; 0]§FrameStats: [ovrPerfStatsPerCompositorFrame; 5]

FrameStatsCount will have a maximum value set by ovrMaxProvidedFrameStats If the application calls ovr_GetPerfStats at the native refresh rate of the HMD then FrameStatsCount will be 1. If the app’s workload happens to force ovr_GetPerfStats to be called at a lower rate, then FrameStatsCount will be 2 or more. If the app does not want to miss any performance data for any frame, it needs to ensure that it is calling ovr_SubmitFrame and ovr_GetPerfStats at a rate that is at least: “HMD_refresh_rate / ovrMaxProvidedFrameStats”. On the Oculus Rift CV1 HMD, this will be equal to 18 times per second.

The performance entries will be ordered in reverse chronological order such that the first entry will be the most recent one.

§FrameStatsCount: c_int§AnyFrameStatsDropped: ovrBool

If the app calls ovr_GetPerfStats at less than 18 fps for CV1, then AnyFrameStatsDropped will be ovrTrue and FrameStatsCount will be equal to ovrMaxProvidedFrameStats.

§AdaptiveGpuPerformanceScale: f32

AdaptiveGpuPerformanceScale is an edge-filtered value that a caller can use to adjust the graphics quality of the application to keep the GPU utilization in check. The value is calculated as: (desired_GPU_utilization / current_GPU_utilization) As such, when this value is 1.0, the GPU is doing the right amount of work for the app. Lower values mean the app needs to pull back on the GPU utilization. If the app is going to directly drive render-target resolution using this value, then be sure to take the square-root of the value before scaling the resolution with it. Changing render target resolutions however is one of the many things an app can do increase or decrease the amount of GPU utilization. Since AdaptiveGpuPerformanceScale is edge-filtered and does not change rapidly (i.e. reports non-1.0 values once every couple of seconds) the app can make the necessary adjustments and then keep watching the value to see if it has been satisfied.

§AswIsAvailable: ovrBool

Will be true if Async Spacewarp (ASW) is available for this system which is dependent on several factors such as choice of GPU, OS and debug overrides

§VisibleProcessId: ovrProcessId

Contains the Process ID of the VR application the stats are being polled for If an app continues to grab perf stats even when it is not visible, then expect this value to point to the other VR app that has grabbed focus (i.e. became visible)

Trait Implementations§

Source§

impl Clone for ovrPerfStats

Source§

fn clone(&self) -> ovrPerfStats

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ovrPerfStats

Source§

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

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

impl Copy for ovrPerfStats

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.