[−][src]Function emu_core::device::convert_to_spirv
pub fn convert_to_spirv<T: Read + Seek>(src: T) -> Result<Vec<u32>, Error>
Converts a slice of bytes to a slice of 4-byte words
Just as a quick example...
let shader: Vec<u32> = convert_to_spirv(std::io::Cursor::new(vec![ // Magic number. Version number: 1.0. 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, // Generator number: 0. Bound: 0. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Reserved word: 0. 0x00, 0x00, 0x00, 0x00, // OpMemoryModel. Logical. 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // GLSL450. 0x01, 0x00, 0x00, 0x00]))?;