From e292767bcdd8f8ffa529fd2f0bd0c8b6c1f86ad3 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 20 Jan 2025 18:40:05 +0100 Subject: [PATCH] workaround lacking type export. See https://github.com/gfx-rs/wgpu/pull/6962 --- Cargo.lock | 1 + Cargo.toml | 2 ++ crates/viewer/re_renderer/Cargo.toml | 2 ++ crates/viewer/re_renderer/src/video/chunk_decoder.rs | 3 ++- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 90860db605e2..bf80a2d4fdc0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6348,6 +6348,7 @@ dependencies = [ "web-sys", "web-time", "wgpu", + "wgpu-types", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index a4fdd32f8f62..a4b0f96166cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -330,6 +330,8 @@ wgpu = { version = "24.0", default-features = false, features = [ # Other: "fragile-send-sync-non-atomic-wasm", ] } +# TODO(gfx-rs/wgpu#6962): There's a type export missing in 24.0.0, so we need to get it directly from wgpu-types. +wgpu-types = "24.0" xshell = "0.2" zip = { version = "0.6", default-features = false } # We're stuck on 0.6 because https://crates.io/crates/protoc-prebuilt is still using 0.6 diff --git a/crates/viewer/re_renderer/Cargo.toml b/crates/viewer/re_renderer/Cargo.toml index 0eb2dab8e0b9..5f2abcb97c12 100644 --- a/crates/viewer/re_renderer/Cargo.toml +++ b/crates/viewer/re_renderer/Cargo.toml @@ -80,6 +80,8 @@ thiserror.workspace = true type-map.workspace = true web-time.workspace = true wgpu.workspace = true +# TODO(gfx-rs/wgpu#6962): There's a type export missing in 24.0.0, so we need to get it directly from wgpu-types. +wgpu-types.workspace = true # optional arrow2 = { workspace = true, optional = true } diff --git a/crates/viewer/re_renderer/src/video/chunk_decoder.rs b/crates/viewer/re_renderer/src/video/chunk_decoder.rs index 4ccc8a0262a3..fcdc7761315c 100644 --- a/crates/viewer/re_renderer/src/video/chunk_decoder.rs +++ b/crates/viewer/re_renderer/src/video/chunk_decoder.rs @@ -193,7 +193,8 @@ fn copy_web_video_frame_to_texture( origin: wgpu::Origin2d { x: 0, y: 0 }, flip_y: false, }; - let dest = wgpu::CopyExternalImageDestInfo { + // TODO(wgpu#6962): This type is not exposed through wgpu. + let dest = wgpu_types::CopyExternalImageDestInfo { texture: &target_texture.texture, mip_level: 0, origin: wgpu::Origin3d { x: 0, y: 0, z: 0 },