INNER CODE UNIT · Rust

compile_shader

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

fn compile_shader(
    path: impl AsRef<Path>,
    entry_name: &str,
    shader_kind: Option<ShaderKind>,
    additional_opts: Option<&CompileOptions<'_>>,
) -> anyhow::Result<CompiledShader> {
    info!("Compiling: {}", path.as_ref().display());

    let path = path.as_ref().to_path_buf();
    let shader_kind = shader_kind.unwrap_or_else(|| guess_shader_kind(&path));

    #[derive(Default)]
    struct FileIncludeProvider(HashSet<PathBuf>);

    impl IncludeProvider for FileIncludeProvider {
        type IncludeContext = PathBuf;

        fn get_include(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…