From 78cd771dfd50924d95b40b3c242174af2a7b3569 Mon Sep 17 00:00:00 2001 From: Inner Daemons <85136135+inner-daemons@users.noreply.github.com> Date: Sun, 1 Mar 2026 13:38:45 -0600 Subject: [PATCH] Fix present synchronization (#9036) --- CHANGELOG.md | 1 + wgpu-core/src/present.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b3f3335b..e8f911876 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -161,6 +161,7 @@ depth_stencil: Some(wgpu::DepthStencilState::stencil( #### General +- Fixed crash on nvidia cards when presenting from another thread. By @inner-daemons in [#9036](https://github.com/gfx-rs/wgpu/pull/9036). - BREAKING: Migrated from the `maxInterStageShaderComponents` limit to `maxInterStageShaderVariables`, which changes validation in a way that should not affect most programs. This follows the latest changes of the WebGPU spec. By @ErichDonGubler in [#8652](https://github.com/gfx-rs/wgpu/pull/8652), [#8792](https://github.com/gfx-rs/wgpu/pull/8792). - Tracing support has been restored. By @andyleiserson in [#8429](https://github.com/gfx-rs/wgpu/pull/8429). - Pipelines using passthrough shaders now correctly require explicit pipeline layout. By @inner-daemons in #8881. diff --git a/wgpu-core/src/present.rs b/wgpu-core/src/present.rs index 86b7c9ca4..733aeb23b 100644 --- a/wgpu-core/src/present.rs +++ b/wgpu-core/src/present.rs @@ -302,6 +302,7 @@ impl Surface { Some(resource::TextureInner::Surface { raw }) => { let raw_surface = self.raw(device.backend()).unwrap(); let raw_queue = queue.raw(); + let _fence_lock = device.fence.write(); unsafe { raw_queue.present(raw_surface, raw) } } _ => unreachable!(),