diff options
| author | Emma Anholt <emma@anholt.net> | 2025-11-14 10:41:02 -0800 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2025-11-14 16:31:15 -0700 |
| commit | 0a1fb7e8cb346f69862e4f12c1d7b09d23e2f84c (patch) | |
| tree | 5eaaae9bf2585bd24c15700ff4df482fe1b02bd8 | |
| parent | 5e57c8f31458ab4f66b187c13ec7501423bac26b (diff) | |
| download | usermoji-0a1fb7e8cb346f69862e4f12c1d7b09d23e2f84c.tar.xz | |
cube: Fix GOOGLE_display_timing desired-present-time calibration.
as the name says, we're calculating what the previous present's
desired time should have been, which will have IPD added for the
next_present_id's presentation. So for example, if we are processing
the last presented frame's actualPresentTime, our multiple should be
0, not 1.
Now the demo properly locks to 60fps for a 1.0 IPD on my 60Hz display.
| -rw-r--r-- | cube/cube.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cube/cube.c b/cube/cube.c index bab9fae8..d28285de 100644 --- a/cube/cube.c +++ b/cube/cube.c @@ -1144,7 +1144,7 @@ void DemoUpdateTargetIPD(struct demo *demo) { } if (calibrate_next) { - int64_t multiple = demo->next_present_id - past[count - 1].presentID; + int64_t multiple = demo->next_present_id - past[count - 1].presentID - 1; demo->prev_desired_present_time = (past[count - 1].actualPresentTime + (multiple * demo->target_IPD)); } free(past); |
