In Avalonia with Vulkan backend prevented throwing an VK_ERROR_OUT_OF_DATE_KHR exception when resizing - #22029
Open
abenedik wants to merge 2 commits into
Open
In Avalonia with Vulkan backend prevented throwing an VK_ERROR_OUT_OF_DATE_KHR exception when resizing#22029abenedik wants to merge 2 commits into
abenedik wants to merge 2 commits into
Conversation
…OR_OUT_OF_DATE_KHR. This may happen when resizing and the surface size is changed after calling AcquireNextImageKHR and before calling vkQueuePresentKHR.
|
You can test this PR using the following package version. |
MrJul
reviewed
Aug 24, 2026
|
You can test this PR using the following package version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the Avalonia app with Vulkan backend is resized, a VK_ERROR_OUT_OF_DATE_KHR exception may be thrown after the call to
vkQueuePresentKHR(inVulkanDisplay.cs).This may happen when the user is resizing the window and the surface size is changed after calling AcquireNextImageKHR and before calling vkQueuePresentKHR.
The exception is handled in the try...catch block in
ServerCompositor.RenderCoremethod and as far as I know it does not cause any harm to the app. Anyway, the exception prevents callingVisualReadbackUpdatePassandExecuteServerJobs(_receivedPostTargetJobQueue)in theRenderCore. But I do not know how important that is.What does the pull request do?
The pull request handles the
VK_ERROR_OUT_OF_DATE_KHR,VK_SUBOPTIMAL_KHRandVK_ERROR_SURFACE_LOST_KHRresults that are expected when callingvkQueuePresentKHR. This is handled in the same way as after callingAcquireNextImageKHR(inStartPresentationmethod).