From 163d2407a168aa7ecb0eb35f403ac3ad4c4e75e0 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 | 3 +++ wgpu-core/src/present.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1587103d..95a65a9cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,9 @@ Bottom level categories: ## v28.0.1 (2025-03-01) +### General +- Fixed crash on nvidia cards when presenting from another thread. By @inner-daemons in [#9036](https://github.com/gfx-rs/wgpu/pull/9036). + ### Vulkan - Fixed crash on some Mali drivers on Android. By @beicause in [#8769](https://github.com/gfx-rs/wgpu/pull/8769). diff --git a/wgpu-core/src/present.rs b/wgpu-core/src/present.rs index 0c28fb260..af8148f7a 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!(),