Class OVRPerfStatsPerCompositorFrame
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.ovr.OVRPerfStatsPerCompositorFrame
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class OVRPerfStatsPerCompositorFrame extends org.lwjgl.system.Struct
Contains the performance stats for a given SDK compositor frame.All of the int fields can be reset via the
ResetPerfStats
call.Member documentation
HmdVsyncIndex
– Vsync Frame Index - increments with each HMD vertical synchronization signal (i.e. vsync or refresh rate).If the compositor drops a frame, expect this value to increment more than 1 at a time.
AppFrameIndex
– index that increments with each successiveSubmitFrame
callAppDroppedFrameCount
– if the app fails to callSubmitFrame
on time, then expect this value to increment with each missed frameAppMotionToPhotonLatency
– motion-to-photon latency for the applicationThis value is calculated by either using the
SensorSampleTime
provided for theOVRLayerEyeFov
or if that is not available, then the call toGetTrackingState
which haslatencyMarker
set toTrue
.AppQueueAheadTime
– amount of queue-ahead in seconds provided to the app based on performance and overlap of CPU and GPU utilization.A value of 0.0 would mean the CPU & GPU workload is being completed in 1 frame's worth of time, while 11 ms (on the CV1) of queue ahead would indicate that the app's CPU workload for the next frame is overlapping the app's GPU workload for the current frame.
AppCpuElapsedTime
– amount of time in seconds spent on the CPU by the app's render-thread that callsSubmitFrame
.Measured as elapsed time between from when app regains control from
SubmitFrame
to the next time the app callsSubmitFrame
.AppGpuElapsedTime
– amount of time in seconds spent on the GPU by the app.Measured as elapsed time between each
SubmitFrame
call using GPU timing queries.CompositorFrameIndex
– index that increments each time the SDK compositor completes a distortion and timewarp pass.Since the compositor operates asynchronously, even if the app calls
SubmitFrame
too late, the compositor will kick off for each vsync.CompositorDroppedFrameCount
– increments each time the SDK compositor fails to complete in time.This is not tied to the app's performance, but failure to complete can be related to other factors such as OS capabilities, overall available hardware cycles to execute the compositor in time and other factors outside of the app's control.
CompositorLatency
– motion-to-photon latency of the SDK compositor in seconds.This is the latency of timewarp which corrects the higher app latency as well as dropped app frames.
CompositorCpuElapsedTime
– the amount of time in seconds spent on the CPU by the SDK compositor.Unless the VR app is utilizing all of the CPU cores at their peak performance, there is a good chance the compositor CPU times will not affect the app's CPU performance in a major way.
CompositorGpuElapsedTime
– the amount of time in seconds spent on the GPU by the SDK compositor. Any time spent on the compositor will eat away from the available GPU time for the app.CompositorCpuStartToGpuEndElapsedTime
– the amount of time in seconds spent from the point the CPU kicks off the compositor to the point in time the compositor completes the distortion & timewarp on the GPU.In the event the GPU time is not available, expect this value to be -1.0f.
CompositorGpuEndToVsyncElapsedTime
– the amount of time in seconds left after the compositor is done on the GPU to the associated V-Sync time.In the event the GPU time is not available, expect this value to be -1.0f.
AswIsActive
– Will be true if ASW is active for the given frame such that the application is being forced into half the frame-rate while the compositor continues to run at full frame-rate.AswActivatedToggleCount
– Increments each time ASW it activated where the app was forced in and out of half-rate rendering.AswPresentedFrameCount
– Accumulates the number of frames presented by the compositor which had extrapolated ASW frames presentedAswFailedFrameCount
– Accumulates the number of frames that the compositor tried to present when ASW is active but failed
Layout
struct ovrPerfStatsPerCompositorFrame { int HmdVsyncIndex; int AppFrameIndex; int AppDroppedFrameCount; float AppMotionToPhotonLatency; float AppQueueAheadTime; float AppCpuElapsedTime; float AppGpuElapsedTime; int CompositorFrameIndex; int CompositorDroppedFrameCount; float CompositorLatency; float CompositorCpuElapsedTime; float CompositorGpuElapsedTime; float CompositorCpuStartToGpuEndElapsedTime; float CompositorGpuEndToVsyncElapsedTime; ovrBool AswIsActive; int AswActivatedToggleCount; int AswPresentedFrameCount; int AswFailedFrameCount; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OVRPerfStatsPerCompositorFrame.Buffer
An array ofOVRPerfStatsPerCompositorFrame
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
APPCPUELAPSEDTIME
APPDROPPEDFRAMECOUNT
APPFRAMEINDEX
APPGPUELAPSEDTIME
APPMOTIONTOPHOTONLATENCY
APPQUEUEAHEADTIME
ASWACTIVATEDTOGGLECOUNT
ASWFAILEDFRAMECOUNT
ASWISACTIVE
ASWPRESENTEDFRAMECOUNT
COMPOSITORCPUELAPSEDTIME
COMPOSITORCPUSTARTTOGPUENDELAPSEDTIME
COMPOSITORDROPPEDFRAMECOUNT
COMPOSITORFRAMEINDEX
COMPOSITORGPUELAPSEDTIME
COMPOSITORGPUENDTOVSYNCELAPSEDTIME
COMPOSITORLATENCY
HMDVSYNCINDEXThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description OVRPerfStatsPerCompositorFrame(java.nio.ByteBuffer container)
Creates aOVRPerfStatsPerCompositorFrame
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description float
AppCpuElapsedTime()
Returns the value of theAppCpuElapsedTime
field.int
AppDroppedFrameCount()
Returns the value of theAppDroppedFrameCount
field.int
AppFrameIndex()
Returns the value of theAppFrameIndex
field.float
AppGpuElapsedTime()
Returns the value of theAppGpuElapsedTime
field.float
AppMotionToPhotonLatency()
Returns the value of theAppMotionToPhotonLatency
field.float
AppQueueAheadTime()
Returns the value of theAppQueueAheadTime
field.int
AswActivatedToggleCount()
Returns the value of theAswActivatedToggleCount
field.int
AswFailedFrameCount()
Returns the value of theAswFailedFrameCount
field.boolean
AswIsActive()
Returns the value of theAswIsActive
field.int
AswPresentedFrameCount()
Returns the value of theAswPresentedFrameCount
field.float
CompositorCpuElapsedTime()
Returns the value of theCompositorCpuElapsedTime
field.float
CompositorCpuStartToGpuEndElapsedTime()
Returns the value of theCompositorCpuStartToGpuEndElapsedTime
field.int
CompositorDroppedFrameCount()
Returns the value of theCompositorDroppedFrameCount
field.int
CompositorFrameIndex()
Returns the value of theCompositorFrameIndex
field.float
CompositorGpuElapsedTime()
Returns the value of theCompositorGpuElapsedTime
field.float
CompositorGpuEndToVsyncElapsedTime()
Returns the value of theCompositorGpuEndToVsyncElapsedTime
field.float
CompositorLatency()
Returns the value of theCompositorLatency
field.static OVRPerfStatsPerCompositorFrame
create(long address)
Returns a newOVRPerfStatsPerCompositorFrame
instance for the specified memory address.static OVRPerfStatsPerCompositorFrame.Buffer
create(long address, int capacity)
Create aOVRPerfStatsPerCompositorFrame.Buffer
instance at the specified memory.static OVRPerfStatsPerCompositorFrame
createSafe(long address)
static OVRPerfStatsPerCompositorFrame.Buffer
createSafe(long address, int capacity)
int
HmdVsyncIndex()
Returns the value of theHmdVsyncIndex
field.static float
nAppCpuElapsedTime(long struct)
Unsafe version ofAppCpuElapsedTime()
.static int
nAppDroppedFrameCount(long struct)
Unsafe version ofAppDroppedFrameCount()
.static int
nAppFrameIndex(long struct)
Unsafe version ofAppFrameIndex()
.static float
nAppGpuElapsedTime(long struct)
Unsafe version ofAppGpuElapsedTime()
.static float
nAppMotionToPhotonLatency(long struct)
Unsafe version ofAppMotionToPhotonLatency()
.static float
nAppQueueAheadTime(long struct)
Unsafe version ofAppQueueAheadTime()
.static int
nAswActivatedToggleCount(long struct)
Unsafe version ofAswActivatedToggleCount()
.static int
nAswFailedFrameCount(long struct)
Unsafe version ofAswFailedFrameCount()
.static boolean
nAswIsActive(long struct)
Unsafe version ofAswIsActive()
.static int
nAswPresentedFrameCount(long struct)
Unsafe version ofAswPresentedFrameCount()
.static float
nCompositorCpuElapsedTime(long struct)
Unsafe version ofCompositorCpuElapsedTime()
.static float
nCompositorCpuStartToGpuEndElapsedTime(long struct)
Unsafe version ofCompositorCpuStartToGpuEndElapsedTime()
.static int
nCompositorDroppedFrameCount(long struct)
Unsafe version ofCompositorDroppedFrameCount()
.static int
nCompositorFrameIndex(long struct)
Unsafe version ofCompositorFrameIndex()
.static float
nCompositorGpuElapsedTime(long struct)
Unsafe version ofCompositorGpuElapsedTime()
.static float
nCompositorGpuEndToVsyncElapsedTime(long struct)
Unsafe version ofCompositorGpuEndToVsyncElapsedTime()
.static float
nCompositorLatency(long struct)
Unsafe version ofCompositorLatency()
.static int
nHmdVsyncIndex(long struct)
Unsafe version ofHmdVsyncIndex()
.int
sizeof()
-
-
-
Field Detail
-
SIZEOF
The struct size in bytes.
-
ALIGNOF
The struct alignment in bytes.
-
HMDVSYNCINDEX, APPFRAMEINDEX, APPDROPPEDFRAMECOUNT, APPMOTIONTOPHOTONLATENCY, APPQUEUEAHEADTIME, APPCPUELAPSEDTIME, APPGPUELAPSEDTIME, COMPOSITORFRAMEINDEX, COMPOSITORDROPPEDFRAMECOUNT, COMPOSITORLATENCY, COMPOSITORCPUELAPSEDTIME, COMPOSITORGPUELAPSEDTIME, COMPOSITORCPUSTARTTOGPUENDELAPSEDTIME, COMPOSITORGPUENDTOVSYNCELAPSEDTIME, ASWISACTIVE, ASWACTIVATEDTOGGLECOUNT, ASWPRESENTEDFRAMECOUNT, ASWFAILEDFRAMECOUNT
The struct member offsets.
-
-
Constructor Detail
-
OVRPerfStatsPerCompositorFrame
public OVRPerfStatsPerCompositorFrame(java.nio.ByteBuffer container)
Creates aOVRPerfStatsPerCompositorFrame
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
HmdVsyncIndex
public int HmdVsyncIndex()
Returns the value of theHmdVsyncIndex
field.
-
AppFrameIndex
public int AppFrameIndex()
Returns the value of theAppFrameIndex
field.
-
AppDroppedFrameCount
public int AppDroppedFrameCount()
Returns the value of theAppDroppedFrameCount
field.
-
AppMotionToPhotonLatency
public float AppMotionToPhotonLatency()
Returns the value of theAppMotionToPhotonLatency
field.
-
AppQueueAheadTime
public float AppQueueAheadTime()
Returns the value of theAppQueueAheadTime
field.
-
AppCpuElapsedTime
public float AppCpuElapsedTime()
Returns the value of theAppCpuElapsedTime
field.
-
AppGpuElapsedTime
public float AppGpuElapsedTime()
Returns the value of theAppGpuElapsedTime
field.
-
CompositorFrameIndex
public int CompositorFrameIndex()
Returns the value of theCompositorFrameIndex
field.
-
CompositorDroppedFrameCount
public int CompositorDroppedFrameCount()
Returns the value of theCompositorDroppedFrameCount
field.
-
CompositorLatency
public float CompositorLatency()
Returns the value of theCompositorLatency
field.
-
CompositorCpuElapsedTime
public float CompositorCpuElapsedTime()
Returns the value of theCompositorCpuElapsedTime
field.
-
CompositorGpuElapsedTime
public float CompositorGpuElapsedTime()
Returns the value of theCompositorGpuElapsedTime
field.
-
CompositorCpuStartToGpuEndElapsedTime
public float CompositorCpuStartToGpuEndElapsedTime()
Returns the value of theCompositorCpuStartToGpuEndElapsedTime
field.
-
CompositorGpuEndToVsyncElapsedTime
public float CompositorGpuEndToVsyncElapsedTime()
Returns the value of theCompositorGpuEndToVsyncElapsedTime
field.
-
AswIsActive
public boolean AswIsActive()
Returns the value of theAswIsActive
field.
-
AswActivatedToggleCount
public int AswActivatedToggleCount()
Returns the value of theAswActivatedToggleCount
field.
-
AswPresentedFrameCount
public int AswPresentedFrameCount()
Returns the value of theAswPresentedFrameCount
field.
-
AswFailedFrameCount
public int AswFailedFrameCount()
Returns the value of theAswFailedFrameCount
field.
-
create
public static OVRPerfStatsPerCompositorFrame create(long address)
Returns a newOVRPerfStatsPerCompositorFrame
instance for the specified memory address.
-
createSafe
@Nullable public static OVRPerfStatsPerCompositorFrame createSafe(long address)
-
create
public static OVRPerfStatsPerCompositorFrame.Buffer create(long address, int capacity)
Create aOVRPerfStatsPerCompositorFrame.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static OVRPerfStatsPerCompositorFrame.Buffer createSafe(long address, int capacity)
-
nHmdVsyncIndex
public static int nHmdVsyncIndex(long struct)
Unsafe version ofHmdVsyncIndex()
.
-
nAppFrameIndex
public static int nAppFrameIndex(long struct)
Unsafe version ofAppFrameIndex()
.
-
nAppDroppedFrameCount
public static int nAppDroppedFrameCount(long struct)
Unsafe version ofAppDroppedFrameCount()
.
-
nAppMotionToPhotonLatency
public static float nAppMotionToPhotonLatency(long struct)
Unsafe version ofAppMotionToPhotonLatency()
.
-
nAppQueueAheadTime
public static float nAppQueueAheadTime(long struct)
Unsafe version ofAppQueueAheadTime()
.
-
nAppCpuElapsedTime
public static float nAppCpuElapsedTime(long struct)
Unsafe version ofAppCpuElapsedTime()
.
-
nAppGpuElapsedTime
public static float nAppGpuElapsedTime(long struct)
Unsafe version ofAppGpuElapsedTime()
.
-
nCompositorFrameIndex
public static int nCompositorFrameIndex(long struct)
Unsafe version ofCompositorFrameIndex()
.
-
nCompositorDroppedFrameCount
public static int nCompositorDroppedFrameCount(long struct)
Unsafe version ofCompositorDroppedFrameCount()
.
-
nCompositorLatency
public static float nCompositorLatency(long struct)
Unsafe version ofCompositorLatency()
.
-
nCompositorCpuElapsedTime
public static float nCompositorCpuElapsedTime(long struct)
Unsafe version ofCompositorCpuElapsedTime()
.
-
nCompositorGpuElapsedTime
public static float nCompositorGpuElapsedTime(long struct)
Unsafe version ofCompositorGpuElapsedTime()
.
-
nCompositorCpuStartToGpuEndElapsedTime
public static float nCompositorCpuStartToGpuEndElapsedTime(long struct)
Unsafe version ofCompositorCpuStartToGpuEndElapsedTime()
.
-
nCompositorGpuEndToVsyncElapsedTime
public static float nCompositorGpuEndToVsyncElapsedTime(long struct)
Unsafe version ofCompositorGpuEndToVsyncElapsedTime()
.
-
nAswIsActive
public static boolean nAswIsActive(long struct)
Unsafe version ofAswIsActive()
.
-
nAswActivatedToggleCount
public static int nAswActivatedToggleCount(long struct)
Unsafe version ofAswActivatedToggleCount()
.
-
nAswPresentedFrameCount
public static int nAswPresentedFrameCount(long struct)
Unsafe version ofAswPresentedFrameCount()
.
-
nAswFailedFrameCount
public static int nAswFailedFrameCount(long struct)
Unsafe version ofAswFailedFrameCount()
.
-
-