Skip to content

Commit

Permalink
Update Blade with acquire fixes, multisampling (#22409)
Browse files Browse the repository at this point in the history
Fixes #22406

Picks up:
- kvark/blade#234 and
kvark/blade#237 (`OutOfDate` workaround)
- kvark/blade#229 ("metal-rs" to "objc2"
migration)

Release Notes:

- Improved handling of resizing and multiple monitors in Linux/Windows
  • Loading branch information
kvark authored Dec 27, 2024
1 parent 7874663 commit 02cc0b9
Show file tree
Hide file tree
Showing 5 changed files with 306 additions and 67 deletions.
241 changes: 229 additions & 12 deletions Cargo.lock

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

13 changes: 4 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@ async-watch = "0.3.1"
async_zip = { version = "0.0.17", features = ["deflate", "deflate64"] }
base64 = "0.22"
bitflags = "2.6.0"
blade-graphics = { git = "https://github.com/kvark/blade", rev = "099555282605c7c4cca9e66a8f40148298347f80" }
blade-macros = { git = "https://github.com/kvark/blade", rev = "099555282605c7c4cca9e66a8f40148298347f80" }
blade-util = { git = "https://github.com/kvark/blade", rev = "099555282605c7c4cca9e66a8f40148298347f80" }
blade-graphics = { git = "https://github.com/kvark/blade", rev = "091a8401033847bb9b6ace3fcf70448d069621c5" }
blade-macros = { git = "https://github.com/kvark/blade", rev = "091a8401033847bb9b6ace3fcf70448d069621c5" }
blade-util = { git = "https://github.com/kvark/blade", rev = "091a8401033847bb9b6ace3fcf70448d069621c5" }
blake3 = "1.5.3"
bytes = "1.0"
cargo_metadata = "0.19"
Expand Down Expand Up @@ -524,12 +524,7 @@ wasmtime-wasi = "24"
which = "6.0.0"
wit-component = "0.201"
zstd = "0.11"
# Custom metal-rs is only needed for "macos-blade" feature of GPUI
#TODO: switch to crates once these are published:
# - https://github.com/gfx-rs/metal-rs/pull/335
# - https://github.com/gfx-rs/metal-rs/pull/336
# - https://github.com/gfx-rs/metal-rs/pull/337
metal = { git = "https://github.com/gfx-rs/metal-rs", rev = "ef768ff9d742ae6a0f4e83ddc8031264e7d460c4" }
metal = "0.30"

[workspace.dependencies.async-stripe]
git = "https://github.com/zed-industries/async-stripe"
Expand Down
7 changes: 5 additions & 2 deletions crates/gpui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test-support = [
"x11",
]
runtime_shaders = []
macos-blade = ["blade-graphics", "blade-macros", "blade-util", "bytemuck"]
macos-blade = ["blade-graphics", "blade-macros", "blade-util", "bytemuck", "objc2", "objc2-metal"]
wayland = [
"blade-graphics",
"blade-macros",
Expand Down Expand Up @@ -132,11 +132,14 @@ core-foundation.workspace = true
core-foundation-sys = "0.8"
core-graphics = "0.23"
core-text = "20.1"
font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "40391b7", optional = true}
font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "40391b7", optional = true }
foreign-types = "0.5"
log.workspace = true
media.workspace = true
objc = "0.2"
objc2 = { version = "0.5", optional = true }
objc2-metal = { version = "0.2", optional = true }
#TODO: replace with "objc2"
metal.workspace = true

[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
Expand Down
1 change: 1 addition & 0 deletions crates/gpui/src/platform/blade/blade_atlas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ impl BladeAtlasState {
},
array_layer_count: 1,
mip_level_count: 1,
sample_count: 1,
dimension: gpu::TextureDimension::D2,
usage,
});
Expand Down
Loading

0 comments on commit 02cc0b9

Please sign in to comment.