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

Implemented VulkanDevice.Dispose #15936

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Conversation

jp2masa
Copy link
Contributor

@jp2masa jp2masa commented Jun 6, 2024

What does the pull request do?

Implemented VulkanDevice.Dispose, calling vkDestroyDevice.

What is the current behavior?

When using the Vulkan backend, at least 2 VkDevices are created, one for initialization and one for rendering. The initialization one is always leaked, because Dispose is called, but it is not implemented.

What is the updated/expected behavior with this PR?

  • Debugging with RenderDoc works (it only works with one VkDevice per VkInstance)
  • VkDevices are no longer leaked

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

It's obvious

Checklist

Breaking changes

N/A

Obsoletions / Deprecations

N/A

Fixed issues

Fixes #15926

@avaloniaui-bot
Copy link

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

@cla-avalonia
Copy link
Collaborator

cla-avalonia commented Jun 6, 2024

  • All contributors have signed the CLA.

@jp2masa
Copy link
Contributor Author

jp2masa commented Jun 6, 2024

@cla-avalonia agree

@maxkatz6 maxkatz6 requested a review from kekekeks June 6, 2024 18:52
@maxkatz6 maxkatz6 added bug area-rendering backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch labels Jun 6, 2024
@maxkatz6
Copy link
Member

maxkatz6 commented Jun 6, 2024

@jp2masa thank you. I wonder how useful is RenderDoc with Avalonia. Or do you use it for embedded 3d rendering?

@jp2masa
Copy link
Contributor Author

jp2masa commented Jun 6, 2024

Or do you use it for embedded 3d rendering?

Exactly.

Copy link
Member

@kekekeks kekekeks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that we still should be cautious with this, since we have to destroy any objects created with that device.

@kekekeks kekekeks added this pull request to the merge queue Jun 7, 2024
Merged via the queue into AvaloniaUI:master with commit 5d2ba6d Jun 7, 2024
11 checks passed
@jp2masa jp2masa deleted the issue-15926 branch June 8, 2024 00:00
maxkatz6 pushed a commit that referenced this pull request Aug 12, 2024
@maxkatz6 maxkatz6 added backported-11.1.x and removed backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch labels Aug 12, 2024
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.

Feature Request: Keep a single VkDevice alive per VkInstance so RenderDoc works
5 participants