authoravatarclover caruso<git@paperclover.net>2026-12-01 15:17:57-08:00
committeravatarclover caruso<git@paperclover.net>2026-12-01 15:22:03-08:00
logc137ce0295f22709d2f8e0d2db6543ea0c6724dd
treed1f8c2d920154d1cc6b46542c66567e077bdc0b5
parent82ccfa96e09d037453c45b34fdca5cd202317cde
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU

Wave 25 integration: wire optflow/custom_shaders cache resets, fix wasm32 Custom pop_error_scope panic, and update CameraShake ledger


4 files changed, 57 insertions(+), 31 deletions(-)

compatibility.md+1-1
...@@ -88,7 +88,7 @@ Fission currently supports **125** tool types across 2D/3D compositing, all with...@@ -88,7 +88,7 @@ Fission currently supports **125** tool types across 2D/3D compositing, all with
88| Tool | Accuracy | Notes |88| Tool | Accuracy | Notes |
89| --- | --- | --- |89| --- | --- | --- |
90| `Transform` | ✅ 100.0% | Motion blur sub-frame accumulation not implemented. |90| `Transform` | ✅ 100.0% | Motion blur sub-frame accumulation not implemented. |
91| `CameraShake` | 98.6% | — |91| `CameraShake` | 99.9% | — |
92| `CornerPositioner` | 99.7% | — |92| `CornerPositioner` | 99.7% | — |
93| `PerspectivePositioner` | 99.7% | — |93| `PerspectivePositioner` | 99.7% | — |
94| `GridWarp` | 98.8%–99.6% | Magnet/Subdivision UI helpers not implemented. |94| `GridWarp` | 98.8%–99.6% | Magnet/Subdivision UI helpers not implemented. |
crates/engine/src/custom_shader.rs+13-3
...@@ -1000,6 +1000,15 @@ impl CustomShaderCache {...@@ -1000,6 +1000,15 @@ impl CustomShaderCache {
1000 self.bg_misses1000 self.bg_misses
1001 }1001 }
10021002
1003 pub fn clear_bind_group_cache(&mut self) {
1004 self.bg_cache.clear();
1005 self.bg_count = 0;
1006 }
1007
1008 pub fn reset_uniform_cursor(&mut self) {
1009 self.uniform_cursor = 0;
1010 }
1011
1003 fn ensure_format_layouts(&mut self, device: &wgpu::Device, format: wgpu::TextureFormat) {1012 fn ensure_format_layouts(&mut self, device: &wgpu::Device, format: wgpu::TextureFormat) {
1004 self.layouts.entry(format).or_insert_with(|| {1013 self.layouts.entry(format).or_insert_with(|| {
1005 let tex_entry = |binding| wgpu::BindGroupLayoutEntry {1014 let tex_entry = |binding| wgpu::BindGroupLayoutEntry {
...@@ -1203,6 +1212,7 @@ impl CustomShaderCache {...@@ -1203,6 +1212,7 @@ impl CustomShaderCache {
1203 ) -> Option<wgpu::ComputePipeline> {1212 ) -> Option<wgpu::ComputePipeline> {
1204 self.ensure_format_layouts(device, format);1213 self.ensure_format_layouts(device, format);
1205 let pl = &self.layouts[&format].pl;1214 let pl = &self.layouts[&format].pl;
1215 #[cfg(not(target_arch = "wasm32"))]
1206 let scope = device.push_error_scope(wgpu::ErrorFilter::Validation);1216 let scope = device.push_error_scope(wgpu::ErrorFilter::Validation);
1207 let module = device.create_shader_module(wgpu::ShaderModuleDescriptor {1217 let module = device.create_shader_module(wgpu::ShaderModuleDescriptor {
1208 label: Some("custom-tool-shader"),1218 label: Some("custom-tool-shader"),
...@@ -1216,11 +1226,11 @@ impl CustomShaderCache {...@@ -1216,11 +1226,11 @@ impl CustomShaderCache {
1216 compilation_options: Default::default(),1226 compilation_options: Default::default(),
1217 cache: None,1227 cache: None,
1218 });1228 });
1229 #[cfg(not(target_arch = "wasm32"))]
1219 if pollster::block_on(scope.pop()).is_some() {1230 if pollster::block_on(scope.pop()).is_some() {
1220 None1231 return None;
1221 } else {
1222 Some(pipeline)
1223 }1232 }
1233 Some(pipeline)
1224 }1234 }
12251235
1226 /// Compiles and caches the compute pipeline for `program` at `format`, returning `false`1236 /// Compiles and caches the compute pipeline for `program` at `format`, returning `false`
crates/engine/src/eval/mod.rs+17-1
...@@ -304,15 +304,19 @@ impl Engine {...@@ -304,15 +304,19 @@ impl Engine {
304304
305 pub(super) fn reset_uniform_cursors(&self) {305 pub(super) fn reset_uniform_cursors(&self) {
306 self.for_each_registry(|r| r.reset_uniform_cursor());306 self.for_each_registry(|r| r.reset_uniform_cursor());
307 if let Some(of) = self.optflow.get() {
308 of.reset_uniform_cursor();
309 }
307 }310 }
308311
309 fn trim_uniform_chunks(&self) {312 fn trim_uniform_chunks(&self) {
310 self.for_each_registry(|r| r.trim_uniform_chunks(2));313 self.for_each_registry(|r| r.trim_uniform_chunks(2));
311 }314 }
312315
313 pub(super) fn sync_bg_cache_with_vram_drops(&self) {316 pub(super) fn sync_bg_cache_with_vram_drops(&mut self) {
314 let drops = self.cache.vram_drops();317 let drops = self.cache.vram_drops();
315 if drops != self.last_bg_vram_drops.get() {318 if drops != self.last_bg_vram_drops.get() {
319 self.custom_shaders.clear_bind_group_cache();
316 self.clear_bind_group_caches();320 self.clear_bind_group_caches();
317 }321 }
318 }322 }
...@@ -321,8 +325,12 @@ impl Engine {...@@ -321,8 +325,12 @@ impl Engine {
321 self.output_cache.clear();325 self.output_cache.clear();
322 self.sync_node_cache_budget();326 self.sync_node_cache_budget();
323 self.cache.bust_all();327 self.cache.bust_all();
328 self.custom_shaders.clear_bind_group_cache();
324 self.clear_bind_group_caches();329 self.clear_bind_group_caches();
325 self.trim_uniform_chunks();330 self.trim_uniform_chunks();
331 if let Some(of) = self.optflow.get() {
332 of.clear_scratch();
333 }
326 #[cfg(not(target_arch = "wasm32"))]334 #[cfg(not(target_arch = "wasm32"))]
327 self.pipelines.borrow_mut().readback_pool.clear();335 self.pipelines.borrow_mut().readback_pool.clear();
328 self.media.clear();336 self.media.clear();
...@@ -339,8 +347,12 @@ impl Engine {...@@ -339,8 +347,12 @@ impl Engine {
339 self.output_cache.clear();347 self.output_cache.clear();
340 self.sync_node_cache_budget();348 self.sync_node_cache_budget();
341 self.cache.bust_all();349 self.cache.bust_all();
350 self.custom_shaders.clear_bind_group_cache();
342 self.clear_bind_group_caches();351 self.clear_bind_group_caches();
343 self.trim_uniform_chunks();352 self.trim_uniform_chunks();
353 if let Some(of) = self.optflow.get() {
354 of.clear_scratch();
355 }
344 #[cfg(not(target_arch = "wasm32"))]356 #[cfg(not(target_arch = "wasm32"))]
345 self.pipelines.borrow_mut().readback_pool.clear();357 self.pipelines.borrow_mut().readback_pool.clear();
346 self.sprite_cache.clear();358 self.sprite_cache.clear();
...@@ -352,6 +364,7 @@ impl Engine {...@@ -352,6 +364,7 @@ impl Engine {
352 self.output_cache.clear();364 self.output_cache.clear();
353 self.sync_node_cache_budget();365 self.sync_node_cache_budget();
354 let busted = self.cache.bust_frame(frame);366 let busted = self.cache.bust_frame(frame);
367 self.custom_shaders.clear_bind_group_cache();
355 self.clear_bind_group_caches();368 self.clear_bind_group_caches();
356 busted369 busted
357 }370 }
...@@ -360,6 +373,7 @@ impl Engine {...@@ -360,6 +373,7 @@ impl Engine {
360 self.output_cache.clear();373 self.output_cache.clear();
361 self.sync_node_cache_budget();374 self.sync_node_cache_budget();
362 let busted = self.cache.bust_subtree(node);375 let busted = self.cache.bust_subtree(node);
376 self.custom_shaders.clear_bind_group_cache();
363 self.clear_bind_group_caches();377 self.clear_bind_group_caches();
364 busted378 busted
365 }379 }
...@@ -426,6 +440,7 @@ impl Engine {...@@ -426,6 +440,7 @@ impl Engine {
426 }440 }
427 self.queue.submit(Some(encoder.finish()));441 self.queue.submit(Some(encoder.finish()));
428 self.reset_uniform_cursors();442 self.reset_uniform_cursors();
443 self.custom_shaders.reset_uniform_cursor();
429 #[cfg(not(target_arch = "wasm32"))]444 #[cfg(not(target_arch = "wasm32"))]
430 self.media.flush_upload_staging_after_submit(&self.device);445 self.media.flush_upload_staging_after_submit(&self.device);
431 self.finish_frame_scratch(visiting);446 self.finish_frame_scratch(visiting);
...@@ -502,6 +517,7 @@ impl Engine {...@@ -502,6 +517,7 @@ impl Engine {
502517
503 self.queue.submit(Some(encoder.finish()));518 self.queue.submit(Some(encoder.finish()));
504 self.reset_uniform_cursors();519 self.reset_uniform_cursors();
520 self.custom_shaders.reset_uniform_cursor();
505 #[cfg(not(target_arch = "wasm32"))]521 #[cfg(not(target_arch = "wasm32"))]
506 self.media.flush_upload_staging_after_submit(&self.device);522 self.media.flush_upload_staging_after_submit(&self.device);
507 if let Some(visiting) = visiting_opt {523 if let Some(visiting) = visiting_opt {
scripts/accuracy_ledger.json+26-26
...@@ -583,24 +583,24 @@...@@ -583,24 +583,24 @@
583 "category": "3D Pipeline"583 "category": "3D Pipeline"
584 },584 },
585 "CameraShake": {585 "CameraShake": {
586 "mean_accuracy": 98.5994,586 "mean_accuracy": 99.8575,
587 "min_accuracy": 94.2405,587 "min_accuracy": 99.5493,
588 "mean_alpha_accuracy": 99.1202,588 "mean_alpha_accuracy": 99.8563,
589 "min_alpha_accuracy": 95.6046,589 "min_alpha_accuracy": 99.7,
590 "frames": 12,590 "frames": 12,
591 "timestamp": "2026-12-01T15:38:28Z",591 "timestamp": "2026-12-01T23:20:03Z",
592 "per_frame": [592 "per_frame": [
593 {593 {
594 "frame": 0,594 "frame": 0,
595 "label": "defaults",595 "label": "defaults",
596 "accuracy": 98.7627,596 "accuracy": 99.8762,
597 "alpha_accuracy": 99.5602597 "alpha_accuracy": 99.8769
598 },598 },
599 {599 {
600 "frame": 1,600 "frame": 1,
601 "label": "Blend=0.7983, InvertTransform=1, ProcessBlue=0",601 "label": "Blend=0.7983, InvertTransform=1, ProcessBlue=0",
602 "accuracy": 94.2405,602 "accuracy": 99.8643,
603 "alpha_accuracy": 95.6046603 "alpha_accuracy": 99.8397
604 },604 },
605 {605 {
606 "frame": 2,606 "frame": 2,
...@@ -611,56 +611,56 @@...@@ -611,56 +611,56 @@
611 {611 {
612 "frame": 3,612 "frame": 3,
613 "label": "RotationDeviation=0.26753",613 "label": "RotationDeviation=0.26753",
614 "accuracy": 98.4528,614 "accuracy": 99.8441,
615 "alpha_accuracy": 99.2349615 "alpha_accuracy": 99.8104
616 },616 },
617 {617 {
618 "frame": 4,618 "frame": 4,
619 "label": "FilterMethod=7, ProcessWhenBlendIs00=1",619 "label": "FilterMethod=7, ProcessWhenBlendIs00=1",
620 "accuracy": 99.3547,620 "accuracy": 99.5493,
621 "alpha_accuracy": 99.6216621 "alpha_accuracy": 99.7
622 },622 },
623 {623 {
624 "frame": 5,624 "frame": 5,
625 "label": "OverallStrength=0.64063, FrequencyMethod=2, YDeviation=0.45367",625 "label": "OverallStrength=0.64063, FrequencyMethod=2, YDeviation=0.45367",
626 "accuracy": 99.8506,626 "accuracy": 99.8611,
627 "alpha_accuracy": 99.8123627 "alpha_accuracy": 99.8147
628 },628 },
629 {629 {
630 "frame": 6,630 "frame": 6,
631 "label": "Edges=2",631 "label": "Edges=2",
632 "accuracy": 98.7037,632 "accuracy": 99.9172,
633 "alpha_accuracy": 99.6278633 "alpha_accuracy": 99.9803
634 },634 },
635 {635 {
636 "frame": 7,636 "frame": 7,
637 "label": "ProcessAlpha=0, FlattenTransform=1",637 "label": "ProcessAlpha=0, FlattenTransform=1",
638 "accuracy": 99.0322,638 "accuracy": 99.895,
639 "alpha_accuracy": 100.0639 "alpha_accuracy": 100.0
640 },640 },
641 {641 {
642 "frame": 8,642 "frame": 8,
643 "label": "ProcessRed=0, XDeviation=0.69915, Speed=0.28972",643 "label": "ProcessRed=0, XDeviation=0.69915, Speed=0.28972",
644 "accuracy": 96.7559,644 "accuracy": 99.8964,
645 "alpha_accuracy": 97.5441645 "alpha_accuracy": 99.8208
646 },646 },
647 {647 {
648 "frame": 9,648 "frame": 9,
649 "label": "InvertTransform=1",649 "label": "InvertTransform=1",
650 "accuracy": 98.7327,650 "accuracy": 99.8109,
651 "alpha_accuracy": 99.3809651 "alpha_accuracy": 99.808
652 },652 },
653 {653 {
654 "frame": 10,654 "frame": 10,
655 "label": "ProcessBlue=0, ProcessGreen=0",655 "label": "ProcessBlue=0, ProcessGreen=0",
656 "accuracy": 99.4475,656 "accuracy": 99.9161,
657 "alpha_accuracy": 99.23657 "alpha_accuracy": 99.7975
658 },658 },
659 {659 {
660 "frame": 11,660 "frame": 11,
661 "label": "InvertTransform=1, ProcessBlue=0, ProcessGreen=0, Randomness=0.10365, WindowMethod=1, RotationDeviation=0.21626, FilterMethod=10, ProcessWhenBlendIs00=1, OverallStrength=0.37217, FrequencyMethod=2",661 "label": "InvertTransform=1, ProcessBlue=0, ProcessGreen=0, Randomness=0.10365, WindowMethod=1, RotationDeviation=0.21626, FilterMethod=10, ProcessWhenBlendIs00=1, OverallStrength=0.37217, FrequencyMethod=2",
662 "accuracy": 99.8596,662 "accuracy": 99.8597,
663 "alpha_accuracy": 99.8265663 "alpha_accuracy": 99.8269
664 }664 }
665 ],665 ],
666 "category": "Transform, Warp & Framing"666 "category": "Transform, Warp & Framing"