blade: Update to e142a3a to fix crash (#17510)
Closes https://github.com/zed-industries/zed/issues/17005 Like https://github.com/zed-industries/zed/pull/17319, but based on https://github.com/kvark/blade/pull/144. This should be cherry-picked into preview if possible 🙂 Release Notes: - Linux: Fixed crash when closing windows on Wayland.
This commit is contained in:
parent
832e3e7dd7
commit
f91bf7fca5
3 changed files with 25 additions and 11 deletions
14
Cargo.lock
generated
14
Cargo.lock
generated
|
@ -1660,8 +1660,8 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "blade-graphics"
|
name = "blade-graphics"
|
||||||
version = "0.4.0"
|
version = "0.5.0"
|
||||||
source = "git+https://github.com/kvark/blade?rev=fee06c42f658b36dd9ac85444a9ee2a481383695#fee06c42f658b36dd9ac85444a9ee2a481383695"
|
source = "git+https://github.com/kvark/blade?rev=e142a3a5e678eb6a13e642ad8401b1f3aa38e969#e142a3a5e678eb6a13e642ad8401b1f3aa38e969"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ash",
|
"ash",
|
||||||
"ash-window",
|
"ash-window",
|
||||||
|
@ -1690,8 +1690,8 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "blade-macros"
|
name = "blade-macros"
|
||||||
version = "0.2.1"
|
version = "0.3.0"
|
||||||
source = "git+https://github.com/kvark/blade?rev=fee06c42f658b36dd9ac85444a9ee2a481383695#fee06c42f658b36dd9ac85444a9ee2a481383695"
|
source = "git+https://github.com/kvark/blade?rev=e142a3a5e678eb6a13e642ad8401b1f3aa38e969#e142a3a5e678eb6a13e642ad8401b1f3aa38e969"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -1701,7 +1701,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "blade-util"
|
name = "blade-util"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/kvark/blade?rev=fee06c42f658b36dd9ac85444a9ee2a481383695#fee06c42f658b36dd9ac85444a9ee2a481383695"
|
source = "git+https://github.com/kvark/blade?rev=e142a3a5e678eb6a13e642ad8401b1f3aa38e969#e142a3a5e678eb6a13e642ad8401b1f3aa38e969"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"blade-graphics",
|
"blade-graphics",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
|
@ -4886,9 +4886,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "glow"
|
name = "glow"
|
||||||
version = "0.13.1"
|
version = "0.14.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1"
|
checksum = "f865cbd94bd355b89611211e49508da98a1fce0ad755c1e8448fb96711b24528"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"slotmap",
|
"slotmap",
|
||||||
|
|
|
@ -166,7 +166,7 @@ members = [
|
||||||
# Tooling
|
# Tooling
|
||||||
#
|
#
|
||||||
|
|
||||||
"tooling/xtask"
|
"tooling/xtask",
|
||||||
]
|
]
|
||||||
default-members = ["crates/zed"]
|
default-members = ["crates/zed"]
|
||||||
|
|
||||||
|
@ -322,9 +322,9 @@ async-watch = "0.3.1"
|
||||||
async_zip = { version = "0.0.17", features = ["deflate", "deflate64"] }
|
async_zip = { version = "0.0.17", features = ["deflate", "deflate64"] }
|
||||||
base64 = "0.22"
|
base64 = "0.22"
|
||||||
bitflags = "2.6.0"
|
bitflags = "2.6.0"
|
||||||
blade-graphics = { git = "https://github.com/kvark/blade", rev = "fee06c42f658b36dd9ac85444a9ee2a481383695" }
|
blade-graphics = { git = "https://github.com/kvark/blade", rev = "e142a3a5e678eb6a13e642ad8401b1f3aa38e969" }
|
||||||
blade-macros = { git = "https://github.com/kvark/blade", rev = "fee06c42f658b36dd9ac85444a9ee2a481383695" }
|
blade-macros = { git = "https://github.com/kvark/blade", rev = "e142a3a5e678eb6a13e642ad8401b1f3aa38e969" }
|
||||||
blade-util = { git = "https://github.com/kvark/blade", rev = "fee06c42f658b36dd9ac85444a9ee2a481383695" }
|
blade-util = { git = "https://github.com/kvark/blade", rev = "e142a3a5e678eb6a13e642ad8401b1f3aa38e969" }
|
||||||
cargo_metadata = "0.18"
|
cargo_metadata = "0.18"
|
||||||
cargo_toml = "0.20"
|
cargo_toml = "0.20"
|
||||||
chrono = { version = "0.4", features = ["serde"] }
|
chrono = { version = "0.4", features = ["serde"] }
|
||||||
|
|
|
@ -336,6 +336,17 @@ impl BladePipelines {
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn destroy(&mut self, gpu: &gpu::Context) {
|
||||||
|
gpu.destroy_render_pipeline(&mut self.quads);
|
||||||
|
gpu.destroy_render_pipeline(&mut self.shadows);
|
||||||
|
gpu.destroy_render_pipeline(&mut self.path_rasterization);
|
||||||
|
gpu.destroy_render_pipeline(&mut self.paths);
|
||||||
|
gpu.destroy_render_pipeline(&mut self.underlines);
|
||||||
|
gpu.destroy_render_pipeline(&mut self.mono_sprites);
|
||||||
|
gpu.destroy_render_pipeline(&mut self.poly_sprites);
|
||||||
|
gpu.destroy_render_pipeline(&mut self.surfaces);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct BladeSurfaceConfig {
|
pub struct BladeSurfaceConfig {
|
||||||
|
@ -438,6 +449,7 @@ impl BladeRenderer {
|
||||||
self.wait_for_gpu();
|
self.wait_for_gpu();
|
||||||
self.surface_config.transparent = transparent;
|
self.surface_config.transparent = transparent;
|
||||||
let surface_info = self.gpu.resize(self.surface_config);
|
let surface_info = self.gpu.resize(self.surface_config);
|
||||||
|
self.pipelines.destroy(&self.gpu);
|
||||||
self.pipelines = BladePipelines::new(&self.gpu, surface_info);
|
self.pipelines = BladePipelines::new(&self.gpu, surface_info);
|
||||||
self.alpha_mode = surface_info.alpha;
|
self.alpha_mode = surface_info.alpha;
|
||||||
}
|
}
|
||||||
|
@ -538,8 +550,10 @@ impl BladeRenderer {
|
||||||
pub fn destroy(&mut self) {
|
pub fn destroy(&mut self) {
|
||||||
self.wait_for_gpu();
|
self.wait_for_gpu();
|
||||||
self.atlas.destroy();
|
self.atlas.destroy();
|
||||||
|
self.gpu.destroy_sampler(self.atlas_sampler);
|
||||||
self.instance_belt.destroy(&self.gpu);
|
self.instance_belt.destroy(&self.gpu);
|
||||||
self.gpu.destroy_command_encoder(&mut self.command_encoder);
|
self.gpu.destroy_command_encoder(&mut self.command_encoder);
|
||||||
|
self.pipelines.destroy(&self.gpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn draw(&mut self, scene: &Scene) {
|
pub fn draw(&mut self, scene: &Scene) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue