Skip to main content

make_spirv

Function 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.

ยง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.