diff options
| author | Liam Middlebrook <lmiddlebrook@nvidia.com> | 2018-05-03 15:52:32 -0700 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2018-05-04 08:29:14 -0600 |
| commit | 881fe3904f99b06941676a2dfd2a7ca50dc9a3ef (patch) | |
| tree | af24f52dba07c45c48c4484df1d669ea9b722c9e | |
| parent | 9cfe0e6092f46852ee9bb912676b97054453314b (diff) | |
| download | usermoji-881fe3904f99b06941676a2dfd2a7ca50dc9a3ef.tar.xz | |
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 <aritger@nvidia.com>
| -rw-r--r-- | demos/cube.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |
