From 480abae3313bb876c037e495fc2d688a79d70836 Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Fri, 6 Sep 2024 16:16:24 +0200 Subject: [PATCH] fix ordering of `device.valid.store` in `device_destroy` --- wgpu-core/src/device/global.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgpu-core/src/device/global.rs b/wgpu-core/src/device/global.rs index 5e108df170..a86651d87f 100644 --- a/wgpu-core/src/device/global.rs +++ b/wgpu-core/src/device/global.rs @@ -2293,7 +2293,7 @@ impl Global { // check for empty queues and a DeviceLostClosure. At that time, // the DeviceLostClosure will be called with "destroyed" as the // reason. - device.valid.store(false, Ordering::Relaxed); + device.valid.store(false, Ordering::Release); } }