Function make_spirv_raw

Source
pub fn make_spirv_raw(bytes: &[u8]) -> Cow<'_, [u32]>
Expand description

Version of [make_spirv()] intended for use with Device::create_shader_module_passthrough().

Returns a raw slice instead of ShaderSource.

ยงPanics

This function panics if:

  • data.len() is not a multiple of 4
  • data does not begin with the SPIR-V magic number

It does not check that the data is a valid SPIR-V module in any other way.