Add simple API sample for VK_EXT_present_timing.#1535
Add simple API sample for VK_EXT_present_timing.#1535nvlduc wants to merge 3 commits intoKhronosGroup:mainfrom
Conversation
asuessenbach
left a comment
There was a problem hiding this comment.
That's an interesting sample!
Unfortunately, it doesn't run on my environment (Win11, NVIDIA RTX A3000 Laptop GPU). It gets a VK_ERROR_SURFACE_LOST_KHR on vkQueuePresentKHR after vkGetPastPresentationTimingEXT got more than 0 (1, to be precise) past_presentation_properties.presentationTimingCount for the first time.
Any idea what that might mean?
Besides that, I have a couple of questions...
| std::array<VkPastPresentationTimingEXT, history_buffer_size> past_presentation_timings; | ||
|
|
||
| /// Frame timing history. This is not directly used and is meant as an example. | ||
| std::array<FrameTimingData, history_buffer_size> timing_history; |
There was a problem hiding this comment.
Do you need past_presentation_timings and timing_history to be the same size, or can they be sized differently?
There was a problem hiding this comment.
They can be different, I probably got lazy here and re-used a constant. I'll add it in the comment
- Fix "times domains" typo in README - Add missing blank lines before bullet lists in README - Rename desired_swapchain_images to desired_swapchain_image_count - Simplify can_use_present_timing boolean assignment
|
Thank you for the review @asuessenbach
Oh, I have not tested this with an igpu, though I don't see how this app could generate a surface lost error. Looking at our implementation, it's also very unexpected. I'll see if I can get my hands on a similar system and look into this. |
Description
This change adds a new "API" sample demonstrating usage of the VK_EXT_present_timing API. I chose this type of sample as opposed to a more complex demo to focus on the API design of this particular extension, rather than exploring the problem space of frame pacing and swapchain best practices which require interactions with other unrelated extensions.
The simple rendering (a circle moving across the display) is a decent test to verify the quality of a VK_EXT_present_timing implementation.
I unfortunately do not have equipment to build this on macOS or Android.
This sample was tested using latest NVIDIA beta developer drivers on Windows 11 (596.10) and Linux (595.44.05) with an NVIDIA RTX 4080.
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: