MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / do_spirv_val

Function do_spirv_val

crates/rustc_codegen_spirv/src/link.rs:356–372  ·  view source on GitHub ↗
(
    sess: &Session,
    spv_binary: &[u32],
    filename: &Path,
    options: spirv_tools::val::ValidatorOptions,
)

Source from the content-addressed store, hash-verified

354}
355
356fn do_spirv_val(
357 sess: &Session,
358 spv_binary: &[u32],
359 filename: &Path,
360 options: spirv_tools::val::ValidatorOptions,
361) {
362 use spirv_tools::val::{self, Validator};
363
364 let validator = val::create(sess.target.options.env.parse().ok());
365
366 if let Err(e) = validator.validate(spv_binary, Some(options)) {
367 let mut err = sess.struct_err(e.to_string());
368 err.note("spirv-val failed");
369 err.note(format!("module `{}`", filename.display()));
370 err.emit();
371 }
372}
373
374fn link_local_crate_native_libs_and_dependent_crate_libs(
375 rlibs: &mut Vec<PathBuf>,

Callers 1

post_link_single_moduleFunction · 0.85

Calls 4

struct_errMethod · 0.80
noteMethod · 0.80
parseMethod · 0.45
emitMethod · 0.45

Tested by

no test coverage detected