INNER CODE UNIT · Rust

compile_shaders_and_watch

attackgoat/vk-graph · crates/vk-graph-hot/src/lib.rs:148

fn compile_shaders_and_watch(
    shaders: &[HotShader],
    watcher: &mut RecommendedWatcher,
) -> Result<Box<[ShaderBuilder]>, DriverError> {
    shaders
        .iter()
        .map(|shader| compile_shader_and_watch(shader, watcher))
        .collect()
}

fn create_watcher(has_changes: &Arc<AtomicBool>) -> RecommendedWatcher {
    let has_changes = Arc::clone(has_changes);

    recommended_watcher(move |event: notify::Result<Event>| {
        let event = event.unwrap_or_else(|_| Event::new(EventKind::Any));
        if matches!(
            event.kind,
            EventKind::Any | EventKind::Modify(_) | EventKind::Other

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…