Skip to content

Commit

Permalink
update wgpu to 24.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Jan 16, 2025
1 parent 15f1e74 commit 5e4ee1b
Show file tree
Hide file tree
Showing 13 changed files with 97 additions and 53 deletions.
93 changes: 69 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ image_rs = { package = "image", version = "0.25.5", default-features = false, fe
regex = "1.11.1"
bytemuck = { version = "1.21.0", features = [ "derive" ] }
serde = { version = "1.0.217", features = ["derive"] }
wgpu = "23.0.1"
wgpu = "24.0.0"
libc = "0.2.169"
smol_str = "0.3.2"
futures = "0.3.31"
Expand Down
4 changes: 1 addition & 3 deletions docs/docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ language: 'en'
- OSC 7 Escape sequences to advise the terminal of the working directory.
- OSC 133 Escape sequence to define Input, Output and Prompt zones.
- OSC 1337 Escape sequences to set user vars for tracking additional shell state.

## 0.2.4

- Breaking: Rio now doesn't allow anymore disable kitty keyboard protocol.
- Fullwidth semantic escape characters.
- Fix: Relax libc requirements on ubuntu by compiling Rio in a 22.04 runner instead of 24.04 [#906](https://github.com/raphamorim/rio/pull/906) by [@marc2332](https://github.com/marc2332).
- Fix: report of Enter/Tab/Backspace in kitty keyboard.
- Fix: use-kitty-keyboard-protocol = true doesn't work with tmux [#599](https://github.com/raphamorim/rio/issues/599).
- Fix: use-kitty-keyboard-protocol breaks F[5-12] on macOS [#904](https://github.com/raphamorim/rio/issues/904).
- Update wgpu to 24.0.0.

## 0.2.3

Expand Down
4 changes: 2 additions & 2 deletions frontends/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ web-sys = { version = "0.3.62", features = [
"GpuFrontFace",
"GpuImageCopyBuffer",
"GpuImageCopyExternalImage",
"GpuImageCopyTexture",
"GpuImageCopyTextureTagged",
"GpuTexelCopyTextureInfo",
"GpuTexelCopyTextureInfoTagged",
"GpuImageDataLayout",
"GpuIndexFormat",
"GpuLoadOp",
Expand Down
12 changes: 6 additions & 6 deletions sugarloaf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ js-sys = "0.3.61"
wasm-bindgen = "0.2.87"
wasm-bindgen-futures = "0.4.34"
wasm-bindgen-test = "0.3.42"
web-sys = { version = "0.3.61", features = [
web-sys = { version = "0.3.77", features = [
"Location",
"Document",
"Navigator",
Expand Down Expand Up @@ -150,11 +150,11 @@ web-sys = { version = "0.3.61", features = [
"GpuFilterMode",
"GpuFragmentState",
"GpuFrontFace",
"GpuImageCopyBuffer",
"GpuImageCopyExternalImage",
"GpuImageCopyTexture",
"GpuImageCopyTextureTagged",
"GpuImageDataLayout",
# "GpuImageCopyBuffer",
# "GpuImageCopyExternalImage",
# "GpuTexelCopyTextureInfo",
# "GpuTexelCopyTextureInfoTagged",
# "GpuImageDataLayout",
"GpuIndexFormat",
"GpuLoadOp",
"gpu_map_mode",
Expand Down
4 changes: 2 additions & 2 deletions sugarloaf/src/components/filters/runtime/luts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ impl LutTexture {
});

queue.write_texture(
wgpu::ImageCopyTexture {
wgpu::TexelCopyTextureInfo {
texture: &texture,
mip_level: 0,
origin: wgpu::Origin3d::ZERO,
aspect: wgpu::TextureAspect::All,
},
&image.bytes,
wgpu::ImageDataLayout {
wgpu::TexelCopyBufferLayout {
offset: 0,
bytes_per_row: Some(4 * image.size.width),
rows_per_image: None,
Expand Down
1 change: 1 addition & 0 deletions sugarloaf/src/components/filters/runtime/mipmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ impl MipmapGen {
mip_level_count: Some(1),
base_array_layer: 0,
array_layer_count: None,
..Default::default()
})
})
.collect::<Vec<_>>();
Expand Down
1 change: 1 addition & 0 deletions sugarloaf/src/components/filters/runtime/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ impl OwnedImage {
mip_level_count: None,
base_array_layer: 0,
array_layer_count: None,
..Default::default()
});

Self {
Expand Down
10 changes: 5 additions & 5 deletions sugarloaf/src/components/layer/atlas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,15 @@ impl Atlas {
});

encoder.copy_buffer_to_texture(
wgpu::ImageCopyBuffer {
wgpu::TexelCopyBufferInfo {
buffer: &buffer,
layout: wgpu::ImageDataLayout {
layout: wgpu::TexelCopyBufferLayout {
offset: offset as u64,
bytes_per_row: Some(4 * image_dimensions.0 + padding),
rows_per_image: Some(image_dimensions.1),
},
},
wgpu::ImageCopyTexture {
wgpu::TexelCopyTextureInfo {
texture: &self.texture,
mip_level: 0,
origin: wgpu::Origin3d {
Expand Down Expand Up @@ -375,7 +375,7 @@ impl Atlas {
}

encoder.copy_texture_to_texture(
wgpu::ImageCopyTexture {
wgpu::TexelCopyTextureInfo {
texture: &self.texture,
mip_level: 0,
origin: wgpu::Origin3d {
Expand All @@ -385,7 +385,7 @@ impl Atlas {
},
aspect: wgpu::TextureAspect::default(),
},
wgpu::ImageCopyTexture {
wgpu::TexelCopyTextureInfo {
texture: &new_texture,
mip_level: 0,
origin: wgpu::Origin3d {
Expand Down
8 changes: 4 additions & 4 deletions sugarloaf/src/components/rich_text/image_cache/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ impl ImageCache {

context.queue.write_texture(
// Tells wgpu where to copy the pixel data
wgpu::ImageCopyTexture {
wgpu::TexelCopyTextureInfo {
texture: &new_texture,
mip_level: 0,
origin: wgpu::Origin3d::ZERO,
Expand All @@ -235,7 +235,7 @@ impl ImageCache {
// The actual pixel data
&self.atlas.buffer,
// The layout of the texture
wgpu::ImageDataLayout {
wgpu::TexelCopyBufferLayout {
offset: 0,
bytes_per_row: Some((self.max_texture_size * 4).into()),
rows_per_image: Some((self.max_texture_size).into()),
Expand All @@ -256,7 +256,7 @@ impl ImageCache {

context.queue.write_texture(
// Tells wgpu where to copy the pixel data
wgpu::ImageCopyTexture {
wgpu::TexelCopyTextureInfo {
texture: &self.texture,
mip_level: 0,
origin: wgpu::Origin3d { x: 0, y: 0, z: 0 },
Expand All @@ -265,7 +265,7 @@ impl ImageCache {
// The actual pixel data
&self.atlas.buffer,
// The layout of the texture
wgpu::ImageDataLayout {
wgpu::TexelCopyBufferLayout {
offset: 0,
bytes_per_row: Some((self.max_texture_size * 4).into()),
rows_per_image: Some((self.max_texture_size).into()),
Expand Down
Loading

0 comments on commit 5e4ee1b

Please sign in to comment.