diff --git a/librashader-cache/src/cache.rs b/librashader-cache/src/cache.rs index 7ea11f2..72b7cff 100644 --- a/librashader-cache/src/cache.rs +++ b/librashader-cache/src/cache.rs @@ -46,7 +46,7 @@ pub(crate) mod internal { pub(crate) fn get_cache() -> Result> { let cache_dir = get_cache_dir()?; let conn = Persy::open_or_create_with(&cache_dir.join("librashader.db.1"), Config::new(), |persy| { - let mut tx = persy.begin()?; + let tx = persy.begin()?; tx.commit()?; Ok(()) })?; diff --git a/librashader-runtime-wgpu/Cargo.toml b/librashader-runtime-wgpu/Cargo.toml index ddb43cd..82d4dc1 100644 --- a/librashader-runtime-wgpu/Cargo.toml +++ b/librashader-runtime-wgpu/Cargo.toml @@ -20,13 +20,20 @@ librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0- librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.11", features = ["wgsl"], default-features = false } librashader-runtime = { path = "../librashader-runtime" , version = "0.2.0-beta.11" } -wgpu = { version = "0.19.0", features = ["spirv"] } +wgpu = { version = "0.19.0", default-features = false, features = ["wgsl"] } rustc-hash = "1.1.0" image = "0.24.7" thiserror = "1.0.50" bytemuck = { version = "1.14.0", features = ["derive"] } array-concat = "0.5.2" + +[features] +# workaround for docsrs to not build metal-rs. +wgpu_dx12 = ["wgpu/dx12"] +wgpu_metal = ["wgpu/metal"] +wgpu_webgpu = ["wgpu/webgpu"] + [target.'cfg(not(target_arch="wasm32"))'.dependencies] rayon = "1.8.1" @@ -37,4 +44,3 @@ raw-window-handle = "0.6.0" winit = "0.29.10" pollster = "0.3" log = "0.4.20" - diff --git a/librashader/Cargo.toml b/librashader/Cargo.toml index 4610ce8..eacf8b6 100644 --- a/librashader/Cargo.toml +++ b/librashader/Cargo.toml @@ -28,7 +28,7 @@ librashader-runtime-mtl = { path = "../librashader-runtime-mtl", version = "0.2. librashader-cache = { path = "../librashader-cache", version = "0.2.0-beta.11" } ash = { version = "0.37", optional = true } -wgpu = { version = "0.19", optional = true } +wgpu = { version = "0.19", default-features = false, optional = true } wgpu-types = { version = "0.19", optional = true } [target.'cfg(windows)'.dependencies.windows]