Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

Merge PR #3419: Issue #1764: running out of device memory falls back without stopping the GPU

aionggc524a2d12c62
diff --cc crates/gpu/src/ctx.rs
index e84dbf08d,c15aa51d7..d3e56f749
--- a/crates/gpu/src/ctx.rs
+++ b/crates/gpu/src/ctx.rs
@@@ -1,10 -1,8 +1,8 @@@
//! The wgpu device, the compiled kernels, buffers, dispatch and readback.
use std::collections::HashMap;
-use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
+use std::sync::atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering};
- use wgpu::util::DeviceExt;
-
/// A kernel module: WGSL source, its storage bindings (name, writable, element type) after the
/// parameter block `P` (binding 0), and its entry points.
struct Module {