KhronosGroup / Vulkan-LoaderAndValidationLayers

**Deprecated repository** for Vulkan loader and validation layers
Apache License 2.0
414 stars 172 forks source link

demos: Fix cube ActualTimeLate function #2637

Closed liam-middlebrook closed 6 years ago

liam-middlebrook commented 6 years ago

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

karl-lunarg commented 6 years ago

Looks like a fix for #2602. I'll ping @ianelliottus for input. But, @liam-middlebrook, can you verify that you observed that this change actually fixes the problem? If so, then I think we should merge it with or without Ian's input.

ianelliottus commented 6 years ago

@liam-middlebrook and @karl-lunarg, I'll take a look.

I also am interested whether a problem was actually observed (while running the code)?

ianelliottus commented 6 years ago

I re-familiarized myself with the code, and yes, this is a good fix of a real bug. Thanks!