-
Notifications
You must be signed in to change notification settings - Fork 49
Correctly handle vk::Result::eOutOfDate from vk::raii::SwapchainKHR::acquireNextImage and vk::raii::Queue::presentKHR #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
I'd prefer option 2, see #220 Forcing out of date on desktop is afaik not (easily) possible, unless you have a tablet that supports orientation changes. Should be easy to test though on Android. |
|
Now that 1.4.335 is out, which includes that VULKAN_HPP_HANDLE_ERROR_OUT_OF_DATE_AS_SUCCESS, we can use it here. Should we now just require at least that version and assume VULKAN_HPP_HANDLE_ERROR_OUT_OF_DATE_AS_SUCCESS is defined, or should we have some compile-time check to either use eOutOfDate as a success code or as an error code? |
|
HI @asuessenbach, we discussed this on the docs call. Let's go with Option 2. LMK when that's been adjusted and we'll merge. Thanks! |
de1879c to
9c35c9b
Compare
Ok, done. |
|
I'm working on it. |
|
Seeing almost the exact same CI failures for me PR. Looks like some issue with CI caching, see #254 |
…acquireNextImage and vk::raii::Queue::presentKHR
9c35c9b to
9796ad7
Compare
gpx1000
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That actually feels like a much better solution. Thanks!
|
I noticed a couple of issues with some of the chapters (with and without my changes): 18: lots of VVL validation messages on |
|
@gpx1000 Now that this PR is complete, please have a look at it again. |
See #102
I don't get a crash, but a black window instead. When enabling validation, I get errors about the descriptor set never being bound. But I think that's intentional, it's the chapter BEFORE descriptor sets are introduced. Might be a good idea to disable drawing though, to avoid potential crashes.
Works fine for me. |
SaschaWillems
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good, but documentation also needs to be adjusted. See e.g. the swap chain recreation chapter.
vk::Result::eOutOfDateis an error code forvk::[raii::]SwapchainKRH::acquireNextImageandvk::[raii::]Queue::presentKHR.That is, as long as
VULKAN_HPP_RAII_NO_EXCEPTIONSis not defined, they throw an exception on such a result.In order to catch that error, you have to use the try-catch-idiom.
As usual, if this is considered to be ok, I can carry that change over to the other chapters.
Note 1: I don't know how to enforce a
vk::Result::eOutOfDateerror from any of those two functions. That is, I could not really test the error handling.Note 2: We could as well wait for and require the next VulkanSDK and define
VULKAN_HPP_HANDLE_ERROR_OUT_OF_DATE_AS_SUCCESS, keeping the source as it is (maybe with some additional comments).