From 881fe3904f99b06941676a2dfd2a7ca50dc9a3ef Mon Sep 17 00:00:00 2001 From: Liam Middlebrook Date: Thu, 3 May 2018 15:52:32 -0700 Subject: demos: Fix cube ActualTimeLate function The ActualTimeLate function in cube.c is supposed to check if a VkPastPresentationTimingGOOGLE structure indicates that the presentation happened within a refresh-cycle duration of the desired presentation time. However currently ActualTimeLate will always return false, because it is calculating the presentation deadline as `actual + rdur`. This change calculated the presentation deadline as `desired + rdur`. Reviewed-by: Andy Ritger --- demos/cube.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/cube.c b/demos/cube.c index b8b49508..2c33e526 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -569,7 +569,7 @@ bool ActualTimeLate(uint64_t desired, uint64_t actual, uint64_t rdur) { // present was obviously NOT late. return false; } - uint64_t deadline = actual + rdur; + uint64_t deadline = desired + rdur; if (actual > deadline) { return true; } else { -- cgit v1.2.3