repame_shell/pipeline_cache.rs
1//! Shutdown-time pipeline-cache persistence.
2
3use repame_save::AppId;
4use repose_render_wgpu::CallbackResources;
5
6/// Flushes every named scene batch's pipeline cache on background threads.
7/// Call this before dropping the device, from a `Quit` shutdown hook.
8pub fn flush_pipeline_caches(
9 app: AppId,
10 device: &wgpu::Device,
11 resources: &CallbackResources,
12 ids: &[String],
13) {
14 for id in ids {
15 repame_view3d::pipeline_cache_io::flush(id, app, device, resources);
16 }
17}