mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-30 18:38:32 +00:00
c/main: Use correct predicted display time for rendering
Closes #114 Reported-by: Boris-Chengbiao Zhou <bobo1239@web.de> Tested-by: Boris-Chengbiao Zhou <bobo1239@web.de>
This commit is contained in:
parent
eb594409dd
commit
003b70d05e
src/xrt/compositor/main
|
@ -144,6 +144,7 @@ compositor_wait_frame(struct xrt_compositor *xc,
|
|||
c->frame.waited.id = frame_id;
|
||||
c->frame.waited.desired_present_time_ns = desired_present_time_ns;
|
||||
c->frame.waited.present_slop_ns = present_slop_ns;
|
||||
c->frame.waited.predicted_display_time_ns = predicted_display_time_ns;
|
||||
|
||||
uint64_t now_ns = os_monotonic_get_ns();
|
||||
if (now_ns < wake_up_time_ns) {
|
||||
|
|
|
@ -158,6 +158,7 @@ struct comp_shaders
|
|||
struct comp_frame
|
||||
{
|
||||
int64_t id;
|
||||
uint64_t predicted_display_time_ns;
|
||||
uint64_t desired_present_time_ns;
|
||||
uint64_t present_slop_ns;
|
||||
};
|
||||
|
|
|
@ -374,7 +374,11 @@ renderer_get_view_projection(struct comp_renderer *r)
|
|||
|
||||
struct xrt_space_relation relation;
|
||||
|
||||
xrt_device_get_tracked_pose(r->c->xdev, XRT_INPUT_GENERIC_HEAD_POSE, r->c->last_next_display_time, &relation);
|
||||
xrt_device_get_tracked_pose( //
|
||||
r->c->xdev, //
|
||||
XRT_INPUT_GENERIC_HEAD_POSE, //
|
||||
r->c->frame.rendering.predicted_display_time_ns, //
|
||||
&relation); //
|
||||
|
||||
struct xrt_vec3 eye_relation = {
|
||||
0.063000f, /* TODO: get actual ipd_meters */
|
||||
|
|
Loading…
Reference in a new issue