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

Function assemble_spirv

crates/rustc_codegen_spirv/src/linker/test.rs:29–40  ·  view source on GitHub ↗
(spirv: &str)

Source from the content-addressed store, hash-verified

27}
28
29fn assemble_spirv(spirv: &str) -> Vec<u8> {
30 use spirv_tools::assembler::{self, Assembler};
31
32 let assembler = assembler::create(None);
33
34 let spv_binary = assembler
35 .assemble(spirv, assembler::AssemblerOptions::default())
36 .expect("Failed to assemble test spir-v");
37
38 let contents: &[u8] = spv_binary.as_ref();
39 contents.to_vec()
40}
41
42#[allow(unused)]
43fn validate(spirv: &[u32]) {

Callers 9

standardFunction · 0.85
not_a_lib_extra_exportsFunction · 0.85
unresolved_symbolFunction · 0.85
type_mismatchFunction · 0.85
multiple_definitionsFunction · 0.85
func_ctrlFunction · 0.85
names_and_decorationsFunction · 0.85

Calls 2

expectMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected