Skip to content

Commit

Permalink
workaround lacking type export. See gfx-rs/wgpu#6962
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Jan 20, 2025
1 parent 37655b9 commit e292767
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6348,6 +6348,7 @@ dependencies = [
"web-sys",
"web-time",
"wgpu",
"wgpu-types",
]

[[package]]
Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions crates/viewer/re_renderer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
3 changes: 2 additions & 1 deletion crates/viewer/re_renderer/src/video/chunk_decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down

0 comments on commit e292767

Please sign in to comment.