The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

u/pacing: Track more variables in app pacer

authored by

Jakob Bornecrantz and committed by
Moses Turner
87fdedeb f0cbb8a7

+13 -3
+13 -3
src/xrt/auxiliary/util/u_pacing_app.c
··· 57 57 { 58 58 int64_t frame_id; 59 59 60 + //! How long we thought the frame would take. 61 + uint64_t predicted_frame_time_ns; 62 + 63 + //! When we predicted the app should wake up. 64 + uint64_t predicted_wake_up_time_ns; 65 + 66 + //! When the client's GPU work should have completed. 67 + uint64_t predicted_gpu_done_time_ns; 68 + 60 69 //! When we predicted this frame to be shown. 61 70 uint64_t predicted_display_time_ns; 62 71 63 72 //! The selected display period. 64 73 uint64_t predicted_display_period_ns; 65 - 66 - //! When the client's GPU work should have completed. 67 - uint64_t predicted_gpu_done_time_ns; 68 74 69 75 /*! 70 76 * When the app told us to display this frame, can be different ··· 328 334 329 335 uint64_t period_ns = calc_period(pa); 330 336 uint64_t predict_ns = predict_display_time(pa, now_ns, period_ns); 337 + // How long we think the frame should take. 338 + uint64_t frame_time_ns = total_app_time_ns(pa); 331 339 // When should the client wake up. 332 340 uint64_t wake_up_time_ns = predict_ns - total_app_and_compositor_time_ns(pa); 333 341 // When the client's GPU work should have completed. ··· 346 354 347 355 f->state = U_RT_PREDICTED; 348 356 f->frame_id = frame_id; 357 + f->predicted_frame_time_ns = frame_time_ns; 358 + f->predicted_wake_up_time_ns = wake_up_time_ns; 349 359 f->predicted_gpu_done_time_ns = gpu_done_time_ns; 350 360 f->predicted_display_time_ns = predict_ns; 351 361 f->predicted_display_period_ns = period_ns;