Function wgpu::util::make_spirv

source ·
pub fn make_spirv(data: &[u8]) -> ShaderSource<'_>
Available on crate feature spirv only.
Expand description

Treat the given byte slice as a SPIR-V module.

§Panic

This function panics if:

  • Input length isn’t multiple of 4
  • Input is longer than usize::max_value
  • Input is empty
  • SPIR-V magic number is missing from beginning of stream