mirror of
https://github.com/astromaddie/HaloCE-VR.git
synced 2026-10-20 05:00:14 +02:00
At 1.5x the GPU needed 11.5 ms a frame (timestamps, vr.timing_gpu_stamps), over 90 Hz's 11.1, almost all of it the eyes' pixels. The runtime's visibility mask (XR_KHR_visibility_mask, 15.6% of each eye's image on the Frame) is now drawn first in each eye's pass at the near plane, black, so the scene is not shaded there (vr.visibility_mask, on). Two things it took: the device binds its target and viewport lazily, so the mask binds the eye's first (halo_vr_bind_current_target); and its depth goes through the position, not gl_FragDepth, which turned Adreno's early depth culling off for the rest of the pass (it saved 0.3 ms that way, 1.5 ms this way). On the device in a30 at 1.5x: the GPU's frame from 11.5 to 10.0 ms (the eyes 4.4/5.1 to 3.6/4.1), 85.5 fps with 45 misses in 10 s to 89.4 with 2 to 5. Cutscenes (the 3D screen, not masked) hold 78 to 89. Also: vr.timing_gpu_passes (each pass waited for; Zink's glFinish costs too much for it to mean much), glQueryCounterEXT and glGetQueryObjectui64vEXT for the guest, the mask's share logged.