Skip to content
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

Vulkan - Fix display surface lost error #16887

Merged
merged 1 commit into from
Sep 2, 2024
Merged

Conversation

emmauss
Copy link
Contributor

@emmauss emmauss commented Sep 2, 2024

What does the pull request do?

Fix vulkan rendering issue when a vulkan surface is destroyed while the application is still running. This is done by disposing the old surface and recreating it and the swapchain.

What is the current behavior?

When a window is no longer valid for a vulkan surface, vulkan throws a VK_ERROR_SURFACE_LOST_KHR error and the surface can no longer be rendered on to. This is very common on Android where any android surface, which acts as a native window, is destroyed when the app suspends.

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

Fixes #16718

@emmauss emmauss requested a review from kekekeks September 2, 2024 12:27
@kekekeks kekekeks enabled auto-merge September 2, 2024 12:45
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0051588-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@kekekeks kekekeks added this pull request to the merge queue Sep 2, 2024
Merged via the queue into master with commit 77fe040 Sep 2, 2024
11 of 12 checks passed
@kekekeks kekekeks deleted the fix_vulkan_display_OOD branch September 2, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When using Vulkan rendering for Android, app presents black screen when resuming.
4 participants