···319319 * A frame has been delivered from the client, see `xrEndFrame`. The GPU might
320320 * still be rendering the work.
321321 *
322322- * @param upa Render timing helper.
323323- * @param[in] frame_id The frame ID to mark as delivered.
324324- * @param[in] when_ns The time when it was delivered, nominally from @ref os_monotonic_get_ns
322322+ * @param upa Render timing helper.
323323+ * @param[in] frame_id The frame ID to mark as delivered.
324324+ * @param[in] when_ns The time when it was delivered, nominally from @ref os_monotonic_get_ns
325325+ * @param[in] display_time_ns The time the frame is to be displayed.
325326 */
326326- void (*mark_delivered)(struct u_pacing_app *upa, int64_t frame_id, uint64_t when_ns);
327327+ void (*mark_delivered)(struct u_pacing_app *upa, int64_t frame_id, uint64_t when_ns, uint64_t display_time_ns);
327328328329 /*!
329330 * A frame has been completed rendered by the GPU, this can happen after `xrEndFrame` has returned.
···420421 * @ingroup aux_pacing
421422 */
422423static inline void
423423-u_pa_mark_delivered(struct u_pacing_app *upa, int64_t frame_id, uint64_t when_ns)
424424+u_pa_mark_delivered(struct u_pacing_app *upa, int64_t frame_id, uint64_t when_ns, uint64_t display_time_ns)
424425{
425425- upa->mark_delivered(upa, frame_id, when_ns);
426426+ upa->mark_delivered(upa, frame_id, when_ns, display_time_ns);
426427}
427428428429/*!
+8-1
src/xrt/auxiliary/util/u_pacing_app.c
···5959 //! When the client should have delivered the frame.
6060 uint64_t predicted_delivery_time_ns;
61616262+ /*!
6363+ * When the app told us to display this frame, can be different
6464+ * then the predicted display time so we track that separately.
6565+ */
6666+ uint64_t display_time_ns;
6767+6268 //! When something happened.
6369 struct
6470 {
···309315}
310316311317static void
312312-pa_mark_delivered(struct u_pacing_app *upa, int64_t frame_id, uint64_t when_ns)
318318+pa_mark_delivered(struct u_pacing_app *upa, int64_t frame_id, uint64_t when_ns, uint64_t display_time_ns)
313319{
314320 struct pacing_app *pa = pacing_app(upa);
315321···321327 assert(f->state == U_RT_BEGUN);
322328323329 f->when.delivered_ns = when_ns;
330330+ f->display_time_ns = display_time_ns;
324331 f->state = U_RT_DELIVERED;
325332}
326333
+1-1
src/xrt/compositor/multi/comp_multi_compositor.c
···327327 // As early as possible.
328328 uint64_t now_ns = os_monotonic_get_ns();
329329 os_mutex_lock(&mc->msc->list_and_timing_lock);
330330- u_pa_mark_delivered(mc->upa, frame_id, now_ns);
330330+ u_pa_mark_delivered(mc->upa, frame_id, now_ns, display_time_ns);
331331 os_mutex_unlock(&mc->msc->list_and_timing_lock);
332332333333 assert(mc->progress.layer_count == 0);