Struct ovr_sys::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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.