Struct ovr_sys::ovrPerfStats [] [src]

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

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

Trait Implementations

impl Debug for ovrPerfStats
[src]

Formats the value using the given formatter.

impl Copy for ovrPerfStats
[src]

impl Clone for ovrPerfStats
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more