sensics / OSVR-RenderManager

Apache License 2.0
64 stars 45 forks source link

Profiling GPU events in Render manager #312

Closed raunaqbn closed 7 years ago

raunaqbn commented 7 years ago

Currently any application (the DX Cube example) does not show the ATW packet in a profiling tool like GPU view.There is no way to measure the performance of ATW.

russell-taylor commented 7 years ago

You can verify that ATW is working using a couple of approaches. One is to run one of the RenderManager example programs that exercise it: AdjustableRenderingDelay(D3D or OpenGL) with a half-second delay and verify that the update rate is smoothed. Another is to look for '[RenderManager]: RenderManagerD3D11ATW: Starting ATW thread' in the console output of any of the demo programs (or in the log file if logging is enabled).

Also, ATW monitors itself and logs a message (also to the console) if it misses a frame. When it misses a frame, it reports the length of time each sub-step of rendering took to give an idea of what is going wrong. These messages look like this: Apr 08 07:40:50.092 info [RenderManager]: RenderManagerThread::threadFunc(): Missed 1+ frame at 18, expected interval 11.111ms but got 22.203 Apr 08 07:40:50.092 info [RenderManager]: (PresentRenderBuffers took 7.914ms) Apr 08 07:40:50.092 info [RenderManager]: (FrameInit 0, WaitForSync 0.896, DisplayInit 0.002, PresentEye 0.048, DisplayFinal 0, FrameFinal 6.934)