fix(vulkan): drop implementation panic for surface texture#9678
Open
hack3rmann wants to merge 9 commits into
Open
fix(vulkan): drop implementation panic for surface texture#9678hack3rmann wants to merge 9 commits into
hack3rmann wants to merge 9 commits into
Conversation
Author
|
I've merged the new changes from the I've reviewed the failing CI checks. The failing cases are:
The issues 1 and 2 are unrelated, because this PR doesn't touch the code in non-panicking code path. |
This was referenced Jun 18, 2026
Contributor
|
Hopefully if you merge trunk again, the CI failures will be resolved. |
935fb20 to
914ebdc
Compare
Author
|
Thank you! All checks have passed |
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.
Connections
Fixes #8243
Description
During panic unwind, we release the acquired_texture slot so the texture (and its SwapchainAcquireSemaphore Arc) is dropped, without calling HAL discard.
That fixes "Trying to destroy a SwapchainAcquireSemaphore that is still in use by a SurfaceTexture" error that causes a secondary panic during unwind and abort the process.
Testing
The original
SurfaceTexture::dropis the same when there's no panic.When a thread is panicking,
SurfaceTexture::dropnow drops the second referenceArc<SwapchainAcquireSemaphore>. After that there will be only one reference to the semaphores. So they can be dropped correctly.I don't think that automated regression test is possible for that fix. But it's pretty niche: only covers that panicking case, where there's already something isn't right. I've tested the panicking case on my machine and the fix is integrated in my engine, that uses wgpu for rendering.
Squash or Rebase?
Squash. The changes are minimal.
Checklist
wgpumay be affected behaviorally.CHANGELOG.mdentries for the user-facing effects of this change are present.