Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

don't use wgpu fork as it was causing crashes in playback (#848)

Brendan Allan467702ef0d08
diff --git a/Cargo.lock b/Cargo.lock
index 93e190e85..a318c2cee 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -965,7 +965,7 @@ dependencies = [
"serde",
"sha2",
"specta",
- "strum",
+ "strum 0.27.2",
"windows 0.60.0",
]
@@ -4593,13 +4593,13 @@ dependencies = [
[[package]]
name = "metal"
-version = "0.32.0"
+version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605"
+checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e"
dependencies = [
"bitflags 2.9.1",
"block",
- "core-graphics-types 0.2.0",
+ "core-graphics-types 0.1.3",
"foreign-types 0.5.0",
"log",
"objc",
@@ -4704,13 +4704,13 @@ dependencies = [
[[package]]
name = "naga"
-version = "25.0.0"
-source = "git+https://github.com/gfx-rs/wgpu?rev=cd41a6e32a6239b65d1cecbeccde6a43a100914a#cd41a6e32a6239b65d1cecbeccde6a43a100914a"
+version = "25.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b977c445f26e49757f9aca3631c3b8b836942cb278d69a92e7b80d3b24da632"
dependencies = [
"arrayvec",
"bit-set",
"bitflags 2.9.1",
- "cfg-if",
"cfg_aliases",
"codespan-reporting",
"half",
@@ -4722,7 +4722,7 @@ dependencies = [
"once_cell",
"rustc-hash 1.1.0",
"spirv",
- "strum",
+ "strum 0.26.3",
"thiserror 2.0.12",
"unicode-ident",
]
@@ -5390,9 +5390,9 @@ checksum = "8c04f5d74368e4d0dfe06c45c8627c81bd7c317d52762d118fb9b3076f6420fd"
[[package]]
name = "ordered-float"
-version = "5.0.0"
+version = "4.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2c1f9f56e534ac6a9b8a4600bdf0f530fb393b5f393e7b4d03489c3cf0c3f01"
+checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951"
dependencies = [
"num-traits",
]
@@ -7528,13 +7528,35 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+[[package]]
+name = "strum"
+version = "0.26.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
+dependencies = [
+ "strum_macros 0.26.4",
+]
+
[[package]]
name = "strum"
version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf"
dependencies = [
- "strum_macros",
+ "strum_macros 0.27.2",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn 2.0.104",
]
[[package]]
@@ -9608,8 +9630,9 @@ checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3"
[[package]]
name = "wgpu"
-version = "25.0.0"
-source = "git+https://github.com/gfx-rs/wgpu?rev=cd41a6e32a6239b65d1cecbeccde6a43a100914a#cd41a6e32a6239b65d1cecbeccde6a43a100914a"
+version = "25.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec8fb398f119472be4d80bc3647339f56eb63b2a331f6a3d16e25d8144197dd9"
dependencies = [
"arrayvec",
"bitflags 2.9.1",
@@ -9635,8 +9658,9 @@ dependencies = [
[[package]]
name = "wgpu-core"
-version = "25.0.0"
-source = "git+https://github.com/gfx-rs/wgpu?rev=cd41a6e32a6239b65d1cecbeccde6a43a100914a#cd41a6e32a6239b65d1cecbeccde6a43a100914a"
+version = "25.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7b882196f8368511d613c6aeec80655160db6646aebddf8328879a88d54e500"
dependencies = [
"arrayvec",
"bit-set",
@@ -9666,7 +9690,8 @@ dependencies = [
[[package]]
name = "wgpu-core-deps-apple"
version = "25.0.0"
-source = "git+https://github.com/gfx-rs/wgpu?rev=cd41a6e32a6239b65d1cecbeccde6a43a100914a#cd41a6e32a6239b65d1cecbeccde6a43a100914a"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfd488b3239b6b7b185c3b045c39ca6bf8af34467a4c5de4e0b1a564135d093d"
dependencies = [
"wgpu-hal",
]
@@ -9674,7 +9699,8 @@ dependencies = [
[[package]]
name = "wgpu-core-deps-emscripten"
version = "25.0.0"
-source = "git+https://github.com/gfx-rs/wgpu?rev=cd41a6e32a6239b65d1cecbeccde6a43a100914a#cd41a6e32a6239b65d1cecbeccde6a43a100914a"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f09ad7aceb3818e52539acc679f049d3475775586f3f4e311c30165cf2c00445"
dependencies = [
"wgpu-hal",
]
@@ -9682,15 +9708,17 @@ dependencies = [
[[package]]
name = "wgpu-core-deps-windows-linux-android"
version = "25.0.0"
-source = "git+https://github.com/gfx-rs/wgpu?rev=cd41a6e32a6239b65d1cecbeccde6a43a100914a#cd41a6e32a6239b65d1cecbeccde6a43a100914a"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cba5fb5f7f9c98baa7c889d444f63ace25574833df56f5b817985f641af58e46"
dependencies = [
"wgpu-hal",
]
[[package]]
name = "wgpu-hal"
-version = "25.0.0"
-source = "git+https://github.com/gfx-rs/wgpu?rev=cd41a6e32a6239b65d1cecbeccde6a43a100914a#cd41a6e32a6239b65d1cecbeccde6a43a100914a"
+version = "25.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f968767fe4d3d33747bbd1473ccd55bf0f6451f55d733b5597e67b5deab4ad17"
dependencies = [
"android_system_properties",
"arrayvec",
@@ -9701,7 +9729,7 @@ dependencies = [
"bytemuck",
"cfg-if",
"cfg_aliases",
- "core-graphics-types 0.2.0",
+ "core-graphics-types 0.1.3",
"glow",
"glutin_wgl_sys",
"gpu-alloc",
@@ -9713,9 +9741,9 @@ dependencies = [
"libc",
"libloading 0.8.8",
"log",
- "metal 0.32.0",
+ "metal 0.31.0",
"naga",
- "ndk-sys 0.6.0+11769913",
+ "ndk-sys 0.5.0+25.2.9519653",
"objc",
"ordered-float",
"parking_lot",
@@ -9736,7 +9764,8 @@ dependencies = [
[[package]]
name = "wgpu-types"
version = "25.0.0"
-source = "git+https://github.com/gfx-rs/wgpu?rev=cd41a6e32a6239b65d1cecbeccde6a43a100914a#cd41a6e32a6239b65d1cecbeccde6a43a100914a"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2aa49460c2a8ee8edba3fca54325540d904dd85b2e086ada762767e17d06e8bc"
dependencies = [
"bitflags 2.9.1",
"bytemuck",
diff --git a/Cargo.toml b/Cargo.toml
index d069781e7..6e4818c35 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -75,4 +75,4 @@ debug = true
screencapturekit = { git = "https://github.com/CapSoftware/screencapturekit-rs", rev = "7ff1e103742e56c8f6c2e940b5e52684ed0bed69" } # branch = "cap-main"
cidre = { git = "https://github.com/CapSoftware/cidre", rev = "517d097ae438" }
# https://github.com/gfx-rs/wgpu/pull/7550
-wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "cd41a6e32a6239b65d1cecbeccde6a43a100914a" }
+# wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "cd41a6e32a6239b65d1cecbeccde6a43a100914a" }
diff --git a/apps/desktop/src-tauri/src/camera.rs b/apps/desktop/src-tauri/src/camera.rs
index 18788cfda..bf1064e67 100644
--- a/apps/desktop/src-tauri/src/camera.rs
+++ b/apps/desktop/src-tauri/src/camera.rs
@@ -713,7 +713,7 @@ impl Renderer {
label: None,
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
view: &surface_view,
- depth_slice: None,
+ // depth_slice: None,
resolve_target: None, // Some(&surface_view),
ops: wgpu::Operations {
load: wgpu::LoadOp::Clear(wgpu::Color {
diff --git a/crates/editor/examples/cli.rs b/crates/editor/examples/cli.rs
new file mode 100644
index 000000000..582b64bbe
--- /dev/null
+++ b/crates/editor/examples/cli.rs
@@ -0,0 +1,14 @@
+use cap_editor::EditorInstance;
+use cap_project::{CursorEvents, ProjectConfiguration, RecordingMeta, RecordingMetaInner, XY};
+use std::path::PathBuf;
+
+#[tokio::main]
+async fn main() {
+ let path: PathBuf = std::env::args().collect::<Vec<_>>().swap_remove(1).into();
+
+ let editor = EditorInstance::new(path, |s| {}).await.unwrap();
+
+ editor.start_playback(30, XY::new(1920, 1080)).await;
+
+ tokio::time::sleep(std::time::Duration::from_secs(5)).await;
+}
diff --git a/crates/rendering/src/lib.rs b/crates/rendering/src/lib.rs
index 06756a2e6..aa7ac878b 100644
--- a/crates/rendering/src/lib.rs
+++ b/crates/rendering/src/lib.rs
@@ -907,7 +907,7 @@ impl RendererLayers {
label: Some("Render Pass"),
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
view: $view,
- depth_slice: None,
+ // depth_slice: None,
resolve_target: None,
ops: wgpu::Operations {
load: $load,