Function demo_vk::graphics::vulkan::spirv_words

source ·
pub fn spirv_words(shader_bytes: &[u8]) -> Result<Vec<u32>>
Expand description

Convert an unaligned slice of bytes into an aligned chunk of u32 words.

This is needed because SPIRV is expected to always take the form of 32 bytes. It is not always safe to simply reinterpret a slice of u8’s due to alignment.