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
8888| Tool | Accuracy | Notes |
8989| --- | --- | --- |
9090| `Transform` | ✅ 100.0% | Motion blur sub-frame accumulation not implemented. |
91| `CameraShake` | 98.6% | — |
91| `CameraShake` | 99.9% | — |
9292| `CornerPositioner` | 99.7% | — |
9393| `PerspectivePositioner` | 99.7% | — |
9494| `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 {
10001000 self.bg_misses
10011001 }
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
10031012 fn ensure_format_layouts(&mut self, device: &wgpu::Device, format: wgpu::TextureFormat) {
10041013 self.layouts.entry(format).or_insert_with(|| {
10051014 let tex_entry = |binding| wgpu::BindGroupLayoutEntry {
......@@ -1203,6 +1212,7 @@ impl CustomShaderCache {
12031212 ) -> Option<wgpu::ComputePipeline> {
12041213 self.ensure_format_layouts(device, format);
12051214 let pl = &self.layouts[&format].pl;
1215 #[cfg(not(target_arch = "wasm32"))]
12061216 let scope = device.push_error_scope(wgpu::ErrorFilter::Validation);
12071217 let module = device.create_shader_module(wgpu::ShaderModuleDescriptor {
12081218 label: Some("custom-tool-shader"),
......@@ -1216,11 +1226,11 @@ impl CustomShaderCache {
12161226 compilation_options: Default::default(),
12171227 cache: None,
12181228 });
1229 #[cfg(not(target_arch = "wasm32"))]
12191230 if pollster::block_on(scope.pop()).is_some() {
1220 None
1221 } else {
1222 Some(pipeline)
1231 return None;
12231232 }
1233 Some(pipeline)
12241234 }
12251235
12261236 /// 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 {
304304
305305 pub(super) fn reset_uniform_cursors(&self) {
306306 self.for_each_registry(|r| r.reset_uniform_cursor());
307 if let Some(of) = self.optflow.get() {
308 of.reset_uniform_cursor();
309 }
307310 }
308311
309312 fn trim_uniform_chunks(&self) {
310313 self.for_each_registry(|r| r.trim_uniform_chunks(2));
311314 }
312315
313 pub(super) fn sync_bg_cache_with_vram_drops(&self) {
316 pub(super) fn sync_bg_cache_with_vram_drops(&mut self) {
314317 let drops = self.cache.vram_drops();
315318 if drops != self.last_bg_vram_drops.get() {
319 self.custom_shaders.clear_bind_group_cache();
316320 self.clear_bind_group_caches();
317321 }
318322 }
......@@ -321,8 +325,12 @@ impl Engine {
321325 self.output_cache.clear();
322326 self.sync_node_cache_budget();
323327 self.cache.bust_all();
328 self.custom_shaders.clear_bind_group_cache();
324329 self.clear_bind_group_caches();
325330 self.trim_uniform_chunks();
331 if let Some(of) = self.optflow.get() {
332 of.clear_scratch();
333 }
326334 #[cfg(not(target_arch = "wasm32"))]
327335 self.pipelines.borrow_mut().readback_pool.clear();
328336 self.media.clear();
......@@ -339,8 +347,12 @@ impl Engine {
339347 self.output_cache.clear();
340348 self.sync_node_cache_budget();
341349 self.cache.bust_all();
350 self.custom_shaders.clear_bind_group_cache();
342351 self.clear_bind_group_caches();
343352 self.trim_uniform_chunks();
353 if let Some(of) = self.optflow.get() {
354 of.clear_scratch();
355 }
344356 #[cfg(not(target_arch = "wasm32"))]
345357 self.pipelines.borrow_mut().readback_pool.clear();
346358 self.sprite_cache.clear();
......@@ -352,6 +364,7 @@ impl Engine {
352364 self.output_cache.clear();
353365 self.sync_node_cache_budget();
354366 let busted = self.cache.bust_frame(frame);
367 self.custom_shaders.clear_bind_group_cache();
355368 self.clear_bind_group_caches();
356369 busted
357370 }
......@@ -360,6 +373,7 @@ impl Engine {
360373 self.output_cache.clear();
361374 self.sync_node_cache_budget();
362375 let busted = self.cache.bust_subtree(node);
376 self.custom_shaders.clear_bind_group_cache();
363377 self.clear_bind_group_caches();
364378 busted
365379 }
......@@ -426,6 +440,7 @@ impl Engine {
426440 }
427441 self.queue.submit(Some(encoder.finish()));
428442 self.reset_uniform_cursors();
443 self.custom_shaders.reset_uniform_cursor();
429444 #[cfg(not(target_arch = "wasm32"))]
430445 self.media.flush_upload_staging_after_submit(&self.device);
431446 self.finish_frame_scratch(visiting);
......@@ -502,6 +517,7 @@ impl Engine {
502517
503518 self.queue.submit(Some(encoder.finish()));
504519 self.reset_uniform_cursors();
520 self.custom_shaders.reset_uniform_cursor();
505521 #[cfg(not(target_arch = "wasm32"))]
506522 self.media.flush_upload_staging_after_submit(&self.device);
507523 if let Some(visiting) = visiting_opt {
scripts/accuracy_ledger.json+26-26
......@@ -583,24 +583,24 @@
583583 "category": "3D Pipeline"
584584 },
585585 "CameraShake": {
586 "mean_accuracy": 98.5994,
587 "min_accuracy": 94.2405,
588 "mean_alpha_accuracy": 99.1202,
589 "min_alpha_accuracy": 95.6046,
586 "mean_accuracy": 99.8575,
587 "min_accuracy": 99.5493,
588 "mean_alpha_accuracy": 99.8563,
589 "min_alpha_accuracy": 99.7,
590590 "frames": 12,
591 "timestamp": "2026-12-01T15:38:28Z",
591 "timestamp": "2026-12-01T23:20:03Z",
592592 "per_frame": [
593593 {
594594 "frame": 0,
595595 "label": "defaults",
596 "accuracy": 98.7627,
597 "alpha_accuracy": 99.5602
596 "accuracy": 99.8762,
597 "alpha_accuracy": 99.8769
598598 },
599599 {
600600 "frame": 1,
601601 "label": "Blend=0.7983, InvertTransform=1, ProcessBlue=0",
602 "accuracy": 94.2405,
603 "alpha_accuracy": 95.6046
602 "accuracy": 99.8643,
603 "alpha_accuracy": 99.8397
604604 },
605605 {
606606 "frame": 2,
......@@ -611,56 +611,56 @@
611611 {
612612 "frame": 3,
613613 "label": "RotationDeviation=0.26753",
614 "accuracy": 98.4528,
615 "alpha_accuracy": 99.2349
614 "accuracy": 99.8441,
615 "alpha_accuracy": 99.8104
616616 },
617617 {
618618 "frame": 4,
619619 "label": "FilterMethod=7, ProcessWhenBlendIs00=1",
620 "accuracy": 99.3547,
621 "alpha_accuracy": 99.6216
620 "accuracy": 99.5493,
621 "alpha_accuracy": 99.7
622622 },
623623 {
624624 "frame": 5,
625625 "label": "OverallStrength=0.64063, FrequencyMethod=2, YDeviation=0.45367",
626 "accuracy": 99.8506,
627 "alpha_accuracy": 99.8123
626 "accuracy": 99.8611,
627 "alpha_accuracy": 99.8147
628628 },
629629 {
630630 "frame": 6,
631631 "label": "Edges=2",
632 "accuracy": 98.7037,
633 "alpha_accuracy": 99.6278
632 "accuracy": 99.9172,
633 "alpha_accuracy": 99.9803
634634 },
635635 {
636636 "frame": 7,
637637 "label": "ProcessAlpha=0, FlattenTransform=1",
638 "accuracy": 99.0322,
638 "accuracy": 99.895,
639639 "alpha_accuracy": 100.0
640640 },
641641 {
642642 "frame": 8,
643643 "label": "ProcessRed=0, XDeviation=0.69915, Speed=0.28972",
644 "accuracy": 96.7559,
645 "alpha_accuracy": 97.5441
644 "accuracy": 99.8964,
645 "alpha_accuracy": 99.8208
646646 },
647647 {
648648 "frame": 9,
649649 "label": "InvertTransform=1",
650 "accuracy": 98.7327,
651 "alpha_accuracy": 99.3809
650 "accuracy": 99.8109,
651 "alpha_accuracy": 99.808
652652 },
653653 {
654654 "frame": 10,
655655 "label": "ProcessBlue=0, ProcessGreen=0",
656 "accuracy": 99.4475,
657 "alpha_accuracy": 99.23
656 "accuracy": 99.9161,
657 "alpha_accuracy": 99.7975
658658 },
659659 {
660660 "frame": 11,
661661 "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,
663 "alpha_accuracy": 99.8265
662 "accuracy": 99.8597,
663 "alpha_accuracy": 99.8269
664664 }
665665 ],
666666 "category": "Transform, Warp & Framing"