diff --git a/Cargo.lock b/Cargo.lock index 2bb6de3df334e..1bc691f9a4ee4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1661,8 +1661,8 @@ dependencies = [ [[package]] name = "blade-graphics" -version = "0.4.0" -source = "git+https://github.com/kvark/blade?rev=fee06c42f658b36dd9ac85444a9ee2a481383695#fee06c42f658b36dd9ac85444a9ee2a481383695" +version = "0.5.0" +source = "git+https://github.com/kvark/blade?rev=e142a3a5e678eb6a13e642ad8401b1f3aa38e969#e142a3a5e678eb6a13e642ad8401b1f3aa38e969" dependencies = [ "ash", "ash-window", @@ -1691,8 +1691,8 @@ dependencies = [ [[package]] name = "blade-macros" -version = "0.2.1" -source = "git+https://github.com/kvark/blade?rev=fee06c42f658b36dd9ac85444a9ee2a481383695#fee06c42f658b36dd9ac85444a9ee2a481383695" +version = "0.3.0" +source = "git+https://github.com/kvark/blade?rev=e142a3a5e678eb6a13e642ad8401b1f3aa38e969#e142a3a5e678eb6a13e642ad8401b1f3aa38e969" dependencies = [ "proc-macro2", "quote", @@ -1702,7 +1702,7 @@ dependencies = [ [[package]] name = "blade-util" 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 = [ "blade-graphics", "bytemuck", @@ -4887,9 +4887,9 @@ dependencies = [ [[package]] name = "glow" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" +checksum = "f865cbd94bd355b89611211e49508da98a1fce0ad755c1e8448fb96711b24528" dependencies = [ "js-sys", "slotmap", diff --git a/Cargo.toml b/Cargo.toml index f008aea827f8c..f2f08506a1cf0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -166,7 +166,7 @@ members = [ # Tooling # - "tooling/xtask" + "tooling/xtask", ] default-members = ["crates/zed"] @@ -322,9 +322,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 = "fee06c42f658b36dd9ac85444a9ee2a481383695" } -blade-macros = { git = "https://github.com/kvark/blade", rev = "fee06c42f658b36dd9ac85444a9ee2a481383695" } -blade-util = { 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 = "e142a3a5e678eb6a13e642ad8401b1f3aa38e969" } +blade-util = { git = "https://github.com/kvark/blade", rev = "e142a3a5e678eb6a13e642ad8401b1f3aa38e969" } cargo_metadata = "0.18" cargo_toml = "0.20" chrono = { version = "0.4", features = ["serde"] } diff --git a/crates/gpui/src/platform/blade/blade_renderer.rs b/crates/gpui/src/platform/blade/blade_renderer.rs index 9f229e64fff20..6930bc5e2d121 100644 --- a/crates/gpui/src/platform/blade/blade_renderer.rs +++ b/crates/gpui/src/platform/blade/blade_renderer.rs @@ -335,6 +335,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 { @@ -437,6 +448,7 @@ impl BladeRenderer { self.wait_for_gpu(); self.surface_config.transparent = transparent; let surface_info = self.gpu.resize(self.surface_config); + self.pipelines.destroy(&self.gpu); self.pipelines = BladePipelines::new(&self.gpu, surface_info); self.alpha_mode = surface_info.alpha; } @@ -537,8 +549,10 @@ impl BladeRenderer { pub fn destroy(&mut self) { self.wait_for_gpu(); self.atlas.destroy(); + self.gpu.destroy_sampler(self.atlas_sampler); self.instance_belt.destroy(&self.gpu); self.gpu.destroy_command_encoder(&mut self.command_encoder); + self.pipelines.destroy(&self.gpu); } pub fn draw(&mut self, scene: &Scene) {