Fix present synchronization#9036
Merged
cwfitzgerald merged 3 commits intogfx-rs:trunkfrom Mar 1, 2026
Merged
Conversation
Contributor
|
I'll be testing this today. |
Contributor
|
@inner-daemons I just tested and it does fix the issue. |
6 tasks
Collaborator
Author
|
Ok so I'll add a changelog later. THen we can backport this |
1 task
|
Any chance to have another look at this? I'm blocked on upgrading some deps as they're on wgpu 28 which currently crashes without this fix. This PR does indeed solve it. Thanks a lot for finding the fix btw! |
Contributor
|
Yeah it would be nice for Ruffle too. |
cwfitzgerald
approved these changes
Mar 1, 2026
| Some(resource::TextureInner::Surface { raw }) => { | ||
| let raw_surface = self.raw(device.backend()).unwrap(); | ||
| let raw_queue = queue.raw(); | ||
| let _fence_lock = device.fence.write(); |
Member
There was a problem hiding this comment.
Definitely need a comment about why this is needed as it's not obvious from the rest of the code. In the name of expediency, I will merge and backport this anyway, but @inner-daemons lets do this in a follow up.
cwfitzgerald
pushed a commit
to cwfitzgerald/wgpu
that referenced
this pull request
Mar 1, 2026
cwfitzgerald
pushed a commit
to cwfitzgerald/wgpu
that referenced
this pull request
Mar 1, 2026
Member
|
Published in v28.0.1! |
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
Closes #9003
Closes #9024
Description
This makes sure that the queue is effectively locked when presenting a texture, since this is still a queue operation and queue operations aren't threadsafe in vulkan.
Testing
Solves the issue
Squash or Rebase?
Squash pls, only commit name is dumb
Checklist
cargo fmt.taplo format.cargo clippy --tests. If applicable, add:--target wasm32-unknown-unknowncargo xtask testto run tests.CHANGELOG.mdentry.