I have an OpenXR application with the OpenGL API. The runtime is SteamVR and the graphics card is Nvidia GeForce RTX 3080 Ti. The render loop is rendering some pointclouds. The framerate when rendering into the VR headset is much lower (40 fps) when compared to rendering into the monitor (100+ fps). I profiled the application using NSight Systems, and it look like my application is spending a bunch of time blocked on XrEndFrame.
See this screenshot, where a single frame is highlighted in the timeline (blue) and I have pointed out the block where XrEndFrame is active.
I'm not sure how to interpret this profile. Can anyone see why xrEndFrame is taking so long? When I zoom in, it looks like the part of the code that actually calls the drawing is very fast. In the screenshot below, (1) is drawing left eye and (2) is drawing right eye.